write a program which takes a number from the user if the number is not equal to 200, it asks the user to enter 4 more numbers and displays the result after subtracting the first 2 numbers and dividing the last 2 numbers.
# Python 3.9.5
number_1 = int(input('Enter number: '))
if number_1 != 200:
i = 0
while i < 4:
number_2 = int(input('Enter number: '))
if i < 2:
number_1 = number_1 - number_2
else:
number_1 = number_1 / number_2
i += 1
print(number_1)
else:
print(number_1)
Comments
Leave a comment