subject

4. Fill in the code so it adds all integers inputted by the user until the number -1 is inputted & then displays that sum (without the -1 added to the sum.) Also trace your code assuming the user inputs the values 4, 3, 1, -1 sum = 0 sum num
num =

while ( ):

num = int(input("Enter a positive integer (-1 to quit): "))



print(

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 17:30
What are the most commonly found items in the trash according to the municipal solid waste report?
Answers: 1
question
Computers and Technology, 23.06.2019 22:20
Learning sign language is an example of a(n) learning sign language is an example of a(n)
Answers: 2
question
Computers and Technology, 24.06.2019 02:00
What is a loop? a. a collection of function definitions at the top of a program b. a line of code that defines a variable and assigns it a value c. a program that opens the turtle graphics window d. a block of code that repeats a specific number of times
Answers: 1
question
Computers and Technology, 24.06.2019 17:50
Which of the following best describe how the depth-limited search works. a normal depth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but the number of ply/depths is limited. a normal breadth-first search is performed but values above a specific value will be ignored. a normal depth-first search is performed but values above a specific value will be ignored.
Answers: 1
You know the right answer?
4. Fill in the code so it adds all integers inputted by the user until the number -1 is inputted &am...
Questions
question
Mathematics, 23.09.2019 19:30
Questions on the website: 13722362