(x, y)
| 2 | |
| 3 | |
| 4 | def compute_lcm(x, y): |
| 5 | # choose the greater number |
| 6 | if x > y: |
| 7 | greater = x |
| 8 | else: |
| 9 | greater = y |
| 10 | |
| 11 | while True: |
| 12 | if (greater % x == 0) and (greater % y == 0): |
| 13 | lcm = greater |
| 14 | break |
| 15 | greater += 1 |
| 16 | |
| 17 | return lcm |
| 18 | |
| 19 | |
| 20 | num1 = 54 |