Python Fundamentals: Character Set, Tokens, Variables & Data Types: 25 flashcards

All 25 flashcards from this kit, free and with no sign-up.

1. What is a character set in Python?

Show the answer

The set of valid characters the Python language recognises.

2. Name the five families of the Python character set.

Show the answer

Letters, digits, special symbols, white spaces, and other characters (ASCII/UNICODE).

3. Which characters count as letters in the Python character set?

Show the answer

A–Z and a–z.

4. Which characters count as digits in the Python character set?

Show the answer

0–9.

5. What is a token in Python?

Show the answer

The smallest individual unit in a program.

6. List the five types of tokens in Python.

Show the answer

Keywords, identifiers, literals, operators, punctuators.

7. What are keywords in Python?

Show the answer

Pre-defined reserved words with a fixed meaning.

8. How many keywords does Python have?

Show the answer

35.

9. Which Python keywords are not all lowercase?

Show the answer

False, True and None.

10. How do you list keywords in the Python shell?

Show the answer

Type help() and then keywords.

11. What is an identifier?

Show the answer

A name used to identify a variable, function, class, module, list or other object.

12. What are the rules for a valid identifier?

Show the answer

Must start with a letter or underscore, cannot start with a digit, cannot contain special characters except underscore, and cannot be a keyword.

13. Is Python case-sensitive for identifiers?

Show the answer

Yes — Name and name are different identifiers.

14. What are literals?

Show the answer

Fixed values assigned to variables or constants.

15. What are the types of literals in Python?

Show the answer

String, numeric, boolean, None, and literal collections.

16. What are operators?

Show the answer

Symbols that perform an operation on operands.

17. Name the operator families in Python.

Show the answer

Arithmetic, relational, logical, membership, assignment, bitwise and identity.

18. What are punctuators?

Show the answer

Symbols that organise statements, structures and expressions.

19. Give examples of common punctuators.

Show the answer

' " # \ ( ) [ ] { } @ , : . =

20. What is a variable?

Show the answer

A named place in memory that holds a value.

21. When is a variable created in Python?

Show the answer

When a value is first assigned to it.

22. How can multiple variables share one value?

Show the answer

x = y = 5

23. How can multiple variables take multiple values in one statement?

Show the answer

x, y, z = 5, 6, "Hello"

24. What rules must variable names follow?

Show the answer

All identifier rules — start with a letter or underscore, no leading digit, no special characters except underscore, not a keyword.

25. Are myvariable, Myvariable and myVariable the same variable?

Show the answer

No — Python is case-sensitive, so they are three distinct variables.

Make your own

Your notes can be a kit like these

Every kit here was made from real study material. Point Veda at a chapter, a PDF, a photo or a link and get notes, flashcards, practice MCQs, games and a scored test — free to start, in more than 40 languages.

  • Chapter notes
  • Flashcards
  • Practice MCQs
  • Scored tests
  • Paper Solver

Get Veda free See what students get

Free to start · Android app and web · More than 40 languages