Python 3 - Mock Test III
Python 3 - Mock Test III
Q 1 - Which of the following operator in python evaluates to true if it does not finds a variable in the specified sequence and false otherwise?
Q 2 - Which of the following statement terminates the loop statement and transfers execution to the statement immediately following the loop?
Q 3 - Which of the following statement causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating?
Q 4 - Which of the following statement is used when a statement is required syntactically but you do not want any command or code to execute?
Q 5 - Which of the following function returns a random item from a list, tuple, or string?
Q 6 - Which of the following function returns a randomly selected element from range?
Q 7 - Which of the following function returns a random float r, such that 0 is less than or equal to r and r is less than 1?
Q 8 - Which of the following function sets the integer starting value used in generating random numbers?
Q 9 - Which of the following function randomizes the items of a list in place?
Q 10 - Which of the following function capitalizes first letter of string?
Q 11 - Which of the following function checks in a string that all characters are alphanumeric?
Q 12 - Which of the following function checks in a string that all characters are digits?
Q 13 - Which of the following function checks in a string that all characters are in lowercase?
Q 14 - Which of the following function checks in a string that all characters are numeric?
Q 15 - Which of the following function checks in a string that all characters are whitespaces?
Q 16 - Which of the following function checks in a string that all characters are titlecased?
Q 17 - Which of the following function checks in a string that all characters are in uppercase?
Q 18 - Which of the following function merges elements in a sequence?
Q 19 - Which of the following function gets the length of the string?
Q 20 - Which of the following function gets a space-padded string with the original string left-justified to a total of width columns?
Q 21 - Which of the following function converts a string to all lowercase?
Q 22 - Which of the following function removes all leading whitespace in string?
Q 23 - Which of the following function returns the max alphabetical character from the string str?
Q 24 - Which of the following function returns the min alphabetical character from the string str?
Q 25 - Which of the following function replaces all occurrences of old substring in string with new string?
| Question Number | Answer Key |
|---|---|
| 1 | D |
| 2 | A |
| 3 | B |
| 4 | C |
| 5 | A |
| 6 | B |
| 7 | C |
| 8 | D |
| 9 | A |
| 10 | B |
| 11 | C |
| 12 | D |
| 13 | A |
| 14 | B |
| 15 | C |
| 16 | D |
| 17 | A |
| 18 | B |
| 19 | C |
| 20 | D |
| 21 | A |
| 22 | B |
| 23 | C |
| 24 | D |
| 25 | A |
https://www.tutorialspoint.com/python3/python_mock_test.htm?min=51&max=75

浙公网安备 33010602011771号