Python Fundamentals: Character Set, Tokens, Variables & Data Types: 19 MCQs
All 19 multiple-choice questions from this kit, free and with no sign-up.
Warm-up · 8 questions
Q1. Which of the following best defines the Python character set?
BeginnerAnswers and explanations are in the Veda app.
Q2. Which of these is NOT one of the five families of the Python character set?
BeginnerAnswers and explanations are in the Veda app.
Q3. What is the smallest individual unit in a Python program called?
BeginnerAnswers and explanations are in the Veda app.
Q4. How many keywords does Python have?
BeginnerAnswers and explanations are in the Veda app.
Q5. Which of these is a valid identifier in Python?
BeginnerAnswers and explanations are in the Veda app.
Q6. In the expression 3 + 5 = 8, what is the operator?
BeginnerAnswers and explanations are in the Veda app.
Q7. Which of the following is a punctuator in Python?
BeginnerAnswers and explanations are in the Veda app.
Q8. Python has 35 keywords, all lowercase except False, True and None.
BeginnerAnswers and explanations are in the Veda app.
Building up · 7 questions
Q9. A student writes: x = 10. What is x in this statement?
IntermediateAnswers and explanations are in the Veda app.
Q10. Which statement about Python keywords is correct?
IntermediateAnswers and explanations are in the Veda app.
Q11. Which of these is a literal?
IntermediateAnswers and explanations are in the Veda app.
Q12. What happens when you type help() and then keywords in the Python shell?
IntermediateAnswers and explanations are in the Veda app.
Q13. Which of the following correctly assigns the same value to two variables?
IntermediateAnswers and explanations are in the Veda app.
Q14. A programmer names a variable myVariable. Another writes myvariable. What is true?
IntermediateAnswers and explanations are in the Veda app.
Q15. Which of these is NOT a valid identifier?
IntermediateAnswers and explanations are in the Veda app.
Topper level · 4 questions
Q16. Which statement best explains why keywords cannot be used as variable names?
AdvancedAnswers and explanations are in the Veda app.
Q17. Given the variable assignment `x = 5 + 3`, identify the tokens in this statement and classify them correctly. Which combination of tokens is accurate?
AdvancedAnswers and explanations are in the Veda app.
Q18. Evaluate the following variable assignments: `a = 10`, `b = 20`, `c = a + b`. What will be the data type of `c` after these assignments?
AdvancedAnswers and explanations are in the Veda app.
Q19. If you attempt to use a keyword as a variable name in Python, what will be the outcome? Analyze the following code snippet: `if = 10`.
AdvancedAnswers and explanations are in the Veda app.
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