Physics I / Algorithms, variables, and control flow
Practice question · Select all that apply

Which of these are valid Python variable names?

Hints
  1. Check the first character of each name before anything else.
  2. A name that the language already reserves cannot be reused.
Show the answer
  • A. data1
  • C. _count
  • D. my_var
Why

Names cannot start with a digit, and 'class' is a reserved keyword.

Read the lesson: Algorithms, variables, and control flow →

Practise Algorithms, variables, and control flow

The app has 8 more questions on this lesson, and keeps your place in the course. Physics I is free to start.

More questions on Algorithms, variables, and control flow