Question #325068

Write a python program to compute the smallest
number that is divisible by 2 inputed numbers using (while, for, break or continue)

Expert's answer

a = int(input("Please enter the first value "))
b = int(input("Please enter the second value "))

number = 1
while True:
    if number%a==0 and number%b==0:
        print("Result " + str(number))
        break
    else:
        number+=1

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

LATEST TUTORIALS
APPROVED BY CLIENTS