GIAC
GPYC · Question #50
Which of the following is in the output when program1.py shown below is executed? `` $ cat program1.py a = 5 b = 10 d = a + c print(d) $ python program1.py ``
The correct answer is B. NameError: name 'c' is not defined. You've hit your limit · resets 1pm (America/New_York)
Python Fundamentals & Command Line Tools
Question
Which of the following is in the output when program1.py shown below is executed?
$ cat program1.py
a = 5
b = 10
d = a + c
print(d)
$ python program1.py
Options
- ATypeError: cannot concatenate 'str' and 'int' objects
- BNameError: name 'c' is not defined
- Cac
- D15
How the community answered
(57 responses)- A5% (3)
- B93% (53)
- C2% (1)
Explanation
You've hit your limit · resets 1pm (America/New_York)
Topics
#NameError#undefined variable#Python errors#script execution
Community Discussion
No community discussion yet for this question.