Python 3 - Mock Test IV
Python 3 - Mock Test IV
Q 1 - Which of the following function removes all leading and trailing whitespace in string?
Q 2 - Which of the following function changes case for all letters in string?
Q 3 - Which of the following function returns titlecased version of string?
Q 4 - Which of the following function converts a string to all uppercase?
Q 5 - Which of the following function checks in a string that all characters are decimal?
Q 7 - What is the output of [1, 2, 3] + [4, 5, 6]?
Q 8 - What is the output of ['Hi!'] * 4?
Q 10 - What is the output of for x in [1, 2, 3]: print x?
Q 14 - What is the following function compares elements of both lists?
Q 15 - What is the following function gives the total length of the list?
Q 16 - What is the following function returns item from the list with max value?
Q 17 - What is the following function returns item from the list with min value?
Q 18 - What is the following function returns the lowest index in list that obj appears?
Q 19 - What is the following function inserts an object at given index in a list?
Q 20 - What is the following function removes last object from a list?
Q 21 - What is the following function removes an object from a list?
Q 22 - What is the following function reverses objects of list in place?
Q 23 - What is the following function sorts a list?
Q 24 - What is the following function compares elements of both dictionaries dict1, dict2?
Q 25 - What is the following function compares elements of both dictionaries dict1, dict2?
| Question Number | Answer Key |
|---|---|
| 1 | B |
| 2 | C |
| 3 | D |
| 4 | A |
| 5 | B |
| 6 | C |
| 7 | A |
| 8 | A |
| 9 | A |
| 10 | B |
| 11 | C |
| 12 | A |
| 13 | A |
| 14 | A |
| 15 | B |
| 16 | C |
| 17 | D |
| 18 | A |
| 19 | B |
| 20 | C |
| 21 | D |
| 22 | A |
| 23 | B |
| 24 | C |
| 25 | C |
https://www.tutorialspoint.com/python3/python_mock_test.htm?min=76&max=100

浙公网安备 33010602011771号