GIAC
GPYC · Question #21
What is the output the following commands are typed in Python interactive mode? `` >>> a = 5 >>> b = 10 >>> d = "a" + "c" >>> print (d) ``
Sign in or unlock GPYC to reveal the answer and full explanation for question #21. The question stem and answer options stay visible for context.
Python Fundamentals & Command Line Tools
Question
What is the output the following commands are typed in Python interactive mode?
>>> a = 5
>>> b = 10
>>> d = "a" + "c"
>>> print (d)
Options
- A15
- BNameError: name 'c' is not defined
- Cac
- DTypeError: cannot concatenate 'str' and 'int' objects
Unlock GPYC to see the answer
You've previewed enough free GPYC questions. Unlock GPYC for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.
Topics
#string concatenation#data types#Python operators#interactive mode