Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Groups
Community ▾
A
A
The line print("Age: " + 12) stops with a TypeError. Why? | StemPy Lab
Quizzes
/
The line print("Age: " + 12) stops with a TypeError. Why?
Python Programming
Medium
Middle Stage (6–8)
High School (9–10)
High School (11–12)
Undergraduate
General
Python Basics › Variables and Data Types
Created by
StemPy Lab
The line print("Age: " + 12) stops with a TypeError. Why?
print() cannot show numbers
Text and a number cannot be joined with +. Write str(12), or use a comma.
Age must not be in quotation marks
There is no mistake
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← This time the number is in quotation marks. What does print("7" * 2) show?
Which comes first, the minus or the division? What does print(20 - 6 / 2) show? →
More on
Python Basics › Variables and Data Types
Discussion (0)
Log in
to join the discussion.
Loading…
Problems on this topic
Each of these three programs stops with an error.
Easy
Say what the type of each result is, and what value it has. Decide on paper first.
Medium
A student wants to swap a and b, and writes…
Easy
Trace the program
Medium
All problems on this topic →