Programming and Problem Solving through Python (M3-R5) Test/MCQ 1

3

Programming and Problem Solving through Python

Programming and Problem Solving through Python M4-R5 MCQ Test 1

1 / 22

1. Who developed Python Programming Language?

2 / 22

2. Which of the following is not a valid data type in Python?

3 / 22

3. Which of the following is the correct way to open a file named "example.txt" in Python for reading?

4 / 22

4. How do you comment out a single line in Python?

5 / 22

5. What is the purpose of the 'return' statement in a function?

6 / 22

6. What is the purpose of the 'if' statement in Python?

7 / 22

7. Which of the following is used to get user input in Python?

8 / 22

8. What is the purpose of the 'break' statement in Python?

9 / 22

9. In Python, what does the '// ' operator do when used with integers?

10 / 22

10. In Python, what does the 'import' keyword do?

11 / 22

11. What is the purpose of the 'continue' statement in Python?

12 / 22

12. In Python, what is the purpose of the 'while' loop?

13 / 22

13. Which of the following is used for formatting strings in Python?

14 / 22

14. How do you check the data type of a variable in Python?

15 / 22

15. What is the correct syntax for defining a function in Python?

16 / 22

16. What is the purpose of the 'try' and 'except' blocks in Python?

17 / 22

17. What does the 'range()' function in Python generate?

18 / 22

18. How do you check if a value is present in a list in Python?

19 / 22

19. What is the purpose of the 'pass' statement in Python?

20 / 22

20. What does the '+= ' operator do in Python?

21 / 22

21. What does the 'len()' function do in Python?

22 / 22

22. How do you remove an element from a list in Python?

Your score is

0%

Exit

Leave a Reply

Your email address will not be published. Required fields are marked *