CNIT 15501 MIDTERM 1 QUESTIONS
1. T/F: Computers can create true random numbers.: False
2. T/F: 'if' is a legal Python identifier.: False
3. T/F: In python, the division operator gives a float result. Even if both of the
numbers are integers.: True
4. T/F: If you enter a bunch of letters in response to the input function, the input
function returns a string.: True
5. T/F: 'sum_total' is a legal Python identifier.: True
6. T/F: 'in' is a reserved word in python.: True
7. T/F: The 'int' function can be used to convert a string of digits into an integer.-
: True
8. T/F: While loops are pretest loops.: True
9. T/F: The input function returns a Boolean if the user types in True.: False
10. T/F: String can be used as a sequence in a for loop.: True
11. T/F: By convention, the main function is the first function to be called.: False
12. T/F: Arithmetic Operators have the highest precedence.: True
13. T/F: The if-else structure will always execute only one of the two actions.: True
14. T/F: Boolean values are not case sensitive.: False
15. T/F: Any inputted data is considered string data, regardless of what the user
inputted.: False
16. T/F: Exponentiation has the highest priority, and is always calculated first.: -
False
17. T/F: Operations cannot be performed on strings.: False
1/3
1. T/F: Computers can create true random numbers.: False
2. T/F: 'if' is a legal Python identifier.: False
3. T/F: In python, the division operator gives a float result. Even if both of the
numbers are integers.: True
4. T/F: If you enter a bunch of letters in response to the input function, the input
function returns a string.: True
5. T/F: 'sum_total' is a legal Python identifier.: True
6. T/F: 'in' is a reserved word in python.: True
7. T/F: The 'int' function can be used to convert a string of digits into an integer.-
: True
8. T/F: While loops are pretest loops.: True
9. T/F: The input function returns a Boolean if the user types in True.: False
10. T/F: String can be used as a sequence in a for loop.: True
11. T/F: By convention, the main function is the first function to be called.: False
12. T/F: Arithmetic Operators have the highest precedence.: True
13. T/F: The if-else structure will always execute only one of the two actions.: True
14. T/F: Boolean values are not case sensitive.: False
15. T/F: Any inputted data is considered string data, regardless of what the user
inputted.: False
16. T/F: Exponentiation has the highest priority, and is always calculated first.: -
False
17. T/F: Operations cannot be performed on strings.: False
1/3