Home > Python > Quizzes > Problem Solving and Python Programming Practice Test
Problem Solving and Python Programming Practice Test
Fast practice, instant feedback. Timer auto-submits when time’s up.
Avg score: 42% Most missed: “What arithmetic operators cannot be used with strings?”
Problem Solving and Python Programming Practice Test
Time left 00:00
25 Questions

1. How many except statements can a try- except block have?
2. Which of the following blocks will be executed whether an exception is thrown or not?
3. print(names2[2][0])
4. Suppose list1 is [3, 5, 25, 1, 3], what is min(list1)?
5. What is the output when we execute list(“hello”)?
6. What is the use of tell() method in python?
7. Which function is used to write a list of string in a file?
8. Which function overloads the >> operator?
9. What is the current syntax of remove() a file?
10. What is the order of namespaces in which Python looks for an identifier?
11. Which operator is overloaded by lg ()?
12. Correct syntax of file.readlines() is?
13. Suppose list1 is [3, 4, 5, 20, 5, 25, 1, 3], what is list1.count(5)?
14. What is the correct syntax of open() function?
15. Suppose i is 5 and j is 4, i + j is same as
16. Only problems that are recursively defined can be solved using recursion.
17. Which of the following are the modes of both writing and reading in binary format in file?
18. print(ttt(data[0]))
19. Which of the following mode will refer to binary data?
20. To read the remaining lines of the file from a file object infile, we use _____________.............
21. Which function overloads the == operator?
22. What is called when a function is defined inside a class?
23. What is the pickling?
24. What happens when ‘1’ == 1 is executed?
25. What is the data type of (1)?