Certified Associate in Python Programming (PCAP) — Question 45
Which of the following words can be used as a variable name? (Choose two.)
Answer options
- A. for
- B. True
- C. true
- D. For
Correct answer: C, D
Explanation
In many programming languages, variable names are case-sensitive and can include letters, numbers, and underscores, but cannot be keywords. 'true' (C) and 'For' (D) are valid variable names as they are not reserved keywords in most languages, while 'for' (A) is a reserved keyword and 'True' (B) is typically used as a boolean constant.