116k views
0 votes
Assume the user types in 7 and 10. What is output by the following?

num1 = input ("Enter a number: ")
num2 = input ("Enter a number: ")
print (numi + num2)

User Efkan
by
5.8k points

1 Answer

4 votes

Answer:

Enter a number: 7

Enter a number: 10

Traceback (most recent call last):

File "main.py", line 3, in <module>

print (numi + num2)

NameError: name 'numi' is not defined

Step-by-step explanation:

The typo in the print statement causes a run-time error, where obviously num1+num2 was expected, and an output of 17.

User Alexander Mashin
by
6.0k points