Live Education Quiz
Guest practice Comp – Chapter 3 + Chapter 4
All quizzes

Guest practice

Comp – Chapter 3 + Chapter 4

Questions
25
Answered
0
Limit
Open
Guest mode: this attempt shows an instant score but is not saved. Sign up or log in before playing to store results.
Quiz progress 0% complete
1

Which of the following is a type of error that occurs when the code is syntactically correct but produces incorrect results?

2

What does the following code do?\nimport random\nprint(random.randint(1, 10))

3

پائتھن میں print() فنکشن کیا کرتا ہے؟

4

How many times does the loop run? for i in range(3):

5

Which tool is commonly used for debugging Python code?

6

What is the result of the expression 10 // 3 in Python?

7

What is the purpose of the continue statement in a loop?

8

What is a nested if statement?

9

What does the following code do? my_list = [1, 2, 3] my_list.append(4)

10

Which of the following is used to install Python on a computer?

11

Which statement about debugging is correct?

12

What is a loop inside another loop called?

13

In an if-elif-else chain, how many elif blocks can be used?

14

Which of these is a valid Python comment?

15

پائتھن پروگرام میں غلطیاں تلاش کرنے اور انہیں ٹھیک کرنے کے لیے کون سا عمل استعمال ہوتا ہے؟

16

What does my_list.append(5) do?

17

What type of error occurs when the program is syntactically correct but gives wrong results?

18

What is testing in Python mainly used for?

19

What does the else block do in an if-else statement?

20

What is the purpose of the elif statement in Python?

21

Which of the following is a mutable data type in Python?

22

if-else ڈھانچے میں else بلاک کیا کرتا ہے؟

23

What does the break statement do inside a loop?

24

What is the purpose of the else clause in an if-else statement?

25

Which statement is used to test a condition and then do something if it is true?

Exit quiz