Question: What is the output from the following program, assuming that the user enters the input value 5. def mainO: n = eval(input(Enter a number: ))
What is the output from the following program, assuming that the user enters the input value 5. def mainO: n = eval(input("Enter a number: ")) ans O for x in range(1,n): ans = ans + x print(ans) main() 120 720 0
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
