Answer to Question #325068 in Python for Shahen

Question #325068
Write a python program to compute the smallest
number that is divisible by 2 inputed numbers using (while, for, break or continue)
1
Expert's answer
2022-04-08T03:47:32-0400
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!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS