nerdexam
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) ``

The correct answer is C. ac. You've hit your limit · resets 1pm (America/New_York)

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

How the community answered

(34 responses)
  • B
    6% (2)
  • C
    91% (31)
  • D
    3% (1)

Explanation

You've hit your limit · resets 1pm (America/New_York)

Topics

#string concatenation#data types#Python operators#interactive mode

Community Discussion

No community discussion yet for this question.

Full GPYC Practice