and Operations 2026 | High-Yield Review | Graded A+
1. What does the max() function in Python do?
Calculate the maximum length of a string
Return the maximum index of a list
Find the maximum character in a string
Return the maximum value in a list or tuple
2. Which of the following is used to find the sum of elements in a list in Python?
list.total()
total(list)
list.sum()
sum(list)
3. What is the purpose of the input() function in Python?
To get input data from the user
To perform mathematical
To print output to the console
calculations
To define functions in Python
4. What does the type() function in Python return?
The value of a variable
The contents of a list
, The length of a string
The type of an object
5. If you have a list of integers [2, 4, 6, 8], what will be the result of using the
sum() function on this list?
18
24
16
20
6. Describe the purpose of the input() function in Python and how it is typically
used.
The input() function calculates the length of a list.
The input() function prints messages to the console for the user.
The input() function is used to read data from files.
The input() function is used to capture user input from the console,
allowing for interactive programs.
7. Consider again x=(1,2,3). If you wanted the sum of the numbers in x using a
single function, which command would you use?
sum(x)
sum x
sum[x]
x.sum()
8. In Python, if you call the type() function on an object, what does it return?