Answer to Question #297285 in Python for ssssssss

Question #297285

write a program to print of sum of two number a and b if there sum is less than two otherwise print the product of number


1
Expert's answer
2022-02-13T09:42:22-0500
print('Enter first number:')
a = float(input())
print('Enter second number:')
b = float(input())
if (a + b) < 2:
    print(f'Sum = {a + b}')
else:
    print(f'Product = {a * b}')

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