subject

Ok, this is for computer science we’re suppose to make a program that takes a user input and the user’s input is suppose to be the total of a list. This is what I’ve got so far and my teacher said I was close but I shouldn’t use User_Number in the parameter. ( the indents are in the code for some reason they didn’t carry over thou )

User_Number = input(“What should the sum of numbers be? “)

Def Total(User_Number):

i = 1

numbers = [ ]

while i <= User_Number:

numbers. append( i )

i += 1

Sum_Total = 0

For i in numbers:

Sum_Total += numbers[ i - 1 ]

return Sum_Total

if __name__ == ‘__main__’:

print( Total )

The only things that must be in the program is: user input, a def statement with a parameter, the if name = min statement, and no preexisting functions for the math

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 00:40
If you arrive at the same time as another user straight across from you yield if a. they flash your headlights at you b. you can’t see their turn signals c. you’re going street and they’re running d. you’re turning they’re going straight plz
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 23:00
The valves of the heart and veins are similar in that they both
Answers: 1
question
Computers and Technology, 25.06.2019 05:30
In our new car, we were able to drive 30 miles in a half an hour. from this information, we can determine the car's a. acceleration. b. velocity. c. speed. d. direction.
Answers: 1
You know the right answer?
Ok, this is for computer science we’re suppose to make a program that takes a user input and the use...
Questions
question
Mathematics, 22.04.2021 07:20
question
Mathematics, 22.04.2021 07:20
question
Chemistry, 22.04.2021 07:20
question
Mathematics, 22.04.2021 07:20
question
Mathematics, 22.04.2021 07:20
Questions on the website: 13722363