PCEP Data Types, Variables, Basic I/O and Operators • Set 4
PCEP Data Types, Variables, Basic I/O and Operators Practice Test 4 — 15 questions with explanations. Free, no signup.
A student tries to write a program that prints the square of a number. The code:
num = 5
print("The square is " + num ** 2)When run, a TypeError occurs. Which of the following fixes the error and produces exactly the output 'The square is 25'?
Choose an answer to begin — your selection is scored in the full session.
15 questions · instant feedback and full explanations after every question.