Welcome to your Python Basic
1.
Which keyword skips the current loop iteration?
2.
Which data type stores key–value pairs?
3.
What is the output of: print(bool(""))
4.
Which of the following is an immutable data type in Python?
5.
What is the output of: x = 10 x += 5 print(x)
6.
What is wrong with this code? if x = 5: print(x)
7.
What does while True: indicate?
8.
What will this code print? for i in range(1, 4): print(i, end=" ")
9.
Which line will cause an error?
10.
Which loop is used when the number of iterations is known?
11.
What is the issue in this code? print("Hello)
12.
Which error occurs when a variable is not defined?
13.
What is the output of: x = 5 if x > 3: print("Yes")
14.
What is the result of bool(0)?
15.
What is the data type of x = 10?
16.
Which function converts a value to an integer?
17.
What is the output of: x = "Python" print(x[0])
18.
Which keyword is used for conditional statements in Python?
19.
Which of the following causes a TypeError?
20.
Which operator is used for equality comparison?
21.
What is the output of: print(2 + 3 * 4)
22.
What is the output of the following code? x = True print(x)
23.
Which of the following creates a list?
24.
How many times will this loop run? for i in range(3): print(i)
25.
What does break do in a loop?
26.
What error occurs when accessing an invalid list index?
27.
What is the data type of the value 3.14 in Python?
28.
What is the data type of "10"?
29.
What is the output of: print(len("Hello"))
30.
Which of the following is a syntax error?