43.4k views
1 vote
4.2 Code Practice: Question 1
Help

4.2 Code Practice: Question 1 Help-example-1

1 Answer

6 votes

total = 0

nums = 0

while total <= 100:

num = int(input("Enter a number: "))

nums += 1

total += num

print("Sum: {}".format(total))

print("Numbers Entered: {}".format(nums))

I hope this helps!

User Edsandorf
by
4.5k points