Skip to main content

Python Quiz

Mejbah Ahammad

Python Knowledge Quiz with Timer and Enhanced Explanations

Python Knowledge Quiz

Test your Python knowledge by answering the following questions:

Time Remaining: 05:00

1. Which of the following is the correct syntax to output "Hello World" in Python?

2. What is the correct way to create a function in Python?

3. How do you insert COMMENTS in Python code?

4. Which one is NOT a legal variable name in Python?

5. How do you create a variable with the floating number 2.8?

6. What is the correct file extension for Python files?

7. Which method can be used to return a string in upper case letters?

8. Which of these collections defines a LIST?

9. How do you start writing an if statement in Python?

10. Which keyword is used to create a class in Python?