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