Knowledge check

Python for Beginners: Build Practical Software Skills with Hospital-Themed Projects
Lesson Content
0% Complete

Q1. What is a variable in Python?

  • A type of error message
  • A named place to store a value
  • A command to stop a program
  • A special hospital data file
Reveal answer

Answer: A named place to store a value
Variables hold data so it can be reused later in the program.


Q2. True or False: Input from a user is treated as text by default.

  • True
  • False
Reveal answer

Answer: True
Python usually reads input as a string, so numbers must be converted when you want to do math.


Q3. Which variable name is clearest for a hospital script?

  • x
  • stuff
  • patient_age
  • a1
Reveal answer

Answer: patient_age
Clear names make code easier to understand and maintain.