subject

How would i do this in python? Create a program called Lab3B1 that will do the following
• Ask the user to enter an unknown set of integers, and stop when they enter 9999
• Add up all the even numbers.
• After the loop, print the sum of the even numbers with a label.


This is what I have so far:

data = input("Enter a number or enter 9999 to stop: ")
total=0
while data != "":
number=int(data)
total+= number
data=input("Enter a number or enter 9999 to stop: ")

if data == '9999':
break

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 20:00
How is the number 372 written when expanded out to place values in the base 8 (octal) number system? a. 2 x 4 + 3 x 2 + 4 x 1 b. 3 x 64 + 7 x 8 + 2 x 1 c. 3 x 8 + 7 x 7 + 2 x 6 d. 3 x 100 + 7 x 10 + 2 x 1
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
The next button in the review section shows the next available comment. next slide with no comment. previous comment. edited comment.
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 24.06.2019 10:50
In 2009 to 2010, how many social network users were reported as being victims of online abuse? a. 1 in 10 b. 100% c.1 in 100 d. 50%
Answers: 2
You know the right answer?
How would i do this in python? Create a program called Lab3B1 that will do the following
• A...
Questions
question
Social Studies, 04.03.2021 19:30
question
Mathematics, 04.03.2021 19:30
question
Mathematics, 04.03.2021 19:30
question
Mathematics, 04.03.2021 19:30
Questions on the website: 13722362