Python Beginners Quiz
1 / 14
Let’s start with the world famous “Hello, World!”.
What is the correct syntax to print the above string?
2 / 14
How do you assign a variable?
3 / 14
How to import a module?
4 / 14
How do you create a comment in Python?
5 / 14
Which one is the correct way to create a list?
6 / 14
How do you check data type?
7 / 14
What will the following produce?
8 / 14
Complete the following “for” loop (replace the question mark with the correct answer):
9 / 14
Choose the correct answer about “while” loops.
10 / 14
How do you create an input in Python?
11 / 14
How do you call a function?
12 / 14
You create a variable “x” and open a file (named “file.txt”): x = open(“file.txt”)
How do you close the file?
13 / 14
What error will the following output?
print(b)
14 / 14
How do you create a class in Python?
Your score is
The average score is 69%
Restart quiz