Python Basics For Beginner

Check your understanding of Python basics.

1. What is the output of print(2 + 3 * 2)?
2. Which of the following is a valid variable name in Python?
3. What data type is the value True in Python?
4. Which loop is used to iterate over a sequence (e.g., list, string) in Python?
5. What symbol is used for single-line comments in Python?
6. Which function is used to receive input from the user in Python?
7. What is the result of '5' + '3' in Python?
8. Which of these is an immutable data type in Python?
9. Which of the following are basic data types in Python? (Select all that apply)
10. Which operators can be used for comparison in Python? (Select all that apply)
11. Which are valid ways to create a list in Python? (Select all that apply)
12. What are valid ways to define a function in Python? (Select all that apply)
13. Which are True about Python strings? (Select all that apply)
14. Python uses indentation to define code blocks.
15. The 'if' statement in Python requires parentheses around the condition.
16. A tuple can be modified after creation.
17. The 'and' operator returns True only if both operands are True.
18. What keyword is used to define a function in Python?
19. What data type is returned by the input() function?
20. What symbol is used to assign a value to a variable in Python?
Answered 0 of 0 — 0 correct