def lcm(a,b): lcm.multiple=lcm.multiple+b if((lcm.multiple % a == 0) and (lcm.multiple % b == 0)): return lcm.multiple; else: lcm(a, b) return lcm.multiple lcm.multiple=0 x=int(input("Please enter first number: ")) y=int(input("Please enter second number: ")) if(x>y): l_c_m=lcm(y,x) else: l_c_m=lcm(x,y) print(l_c_m)Output 1:Please enter first number:10Please enter second number:15L.C.M. is: 30Output 2:Please enter first number:8Please enter second number:9L.C.M. is: 72

इन्हें भी देखें।

- while loop
- for loop
- nested loops
- loop control statements (Break, Continue, Pass)
- if statement
- if-else statement
- if-elif statement
- nested if statement
- range() function
- keywords
- Identifiers (names)
- Literals
- Operators
- punctuatorts

Python Programs के लिये यहाँ click करें।