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

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 02:00, king514
6. the is particularly susceptible to the effects of alcohol because it receives a large portion of total blood flow and has a high concentration of neurons. a. heart b. pancreas c. brain d. liver
Answers: 2
image
Computers and Technology, 23.06.2019 17:00, osirisarellane3792
*! 20 points! *jeff wants to create a website with interactive and dynamic content. which programming language will he use? a. dhtml b. html c. css d. javascript
Answers: 1
image
Computers and Technology, 24.06.2019 01:10, jaileen84
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates. json” file), in order of closest-to-farthest from the origin.
Answers: 1
image
Computers and Technology, 25.06.2019 07:30, ineedhelp2285
In a single day more than blank people's lives are affected simply by driving a motor vehicle
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 in other subjects:

Konu
English, 04.05.2021 20:40