Write a program to input three numbers from the user, then print 'You Won' if the sum of input numbers is greater than 1000 class 7
language python
please send me fast
Share
Write a program to input three numbers from the user, then print 'You Won' if the sum of input numbers is greater than 1000 class 7
language python
please send me fast
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Answer:
print("Enter 3 numbers")
tot = 0
for i in range(3):
x = int(input())
tot = tot + x
if(tot >= 1000):
print("You won")
else:
print("You lost")
Explanation:
Verified answer
First we'll ask three numbers from the user separately, then we'll check whether the sum of the input three numbers is greater than 1000 or not, if it is greater than 1000, we'll print "You Won", else we'll print "You Lose" .
The PYTHON program has been attached above with the output. Kindly check it!