Exam 2: Data and Expressions
Exam 1: Introduction102 Questions
Exam 2: Data and Expressions71 Questions
Exam 3: Control Structures129 Questions
Exam 4: Lists85 Questions
Exam 5: Functions83 Questions
Exam 6: Objects and Their Use54 Questions
Exam 7: Modular Design62 Questions
Exam 8: Text Files58 Questions
Exam 9: Dictionaries and Sets33 Questions
Exam 10: Object-Oriented Programming81 Questions
Exam 11: Recursion27 Questions
Select questions type
For the following input statement in which the user enters as input 35, what is displayed by the following
Age = input('Enter your age: ')
Print("You are", age//10, "decades old")
(Multiple Choice)
4.7/5
(38)
Assume that variables k and num have both been initialized to 10, which of the following is true?
(Multiple Choice)
4.8/5
(36)
Indicate what is displayed by the following print statement, for n = 8.096.
Print('n = ', format(n,'.1f'))
(Multiple Choice)
4.8/5
(40)
Give two expressions in Python, one using the minus symbol (-) as a unary operator, and one using it as a binary operator.
(Short Answer)
4.8/5
(31)
Since any floating-point representation contains only a finite number of digits, what is stored for many floating-point values is only an approximation of the true value.
(True/False)
5.0/5
(32)
Python built-in functions _____ and _____ can be used to convert a string type to a numeric type.
(Short Answer)
4.9/5
(38)
Truncated division, denoted by //, truncates the result of a division operation as either an integer or floating-point value, based on the types of operands it is applied to.
(True/False)
4.8/5
(33)
In Python, string literals may contain quotes as part of its value.
(True/False)
4.9/5
(46)
In Python, a comma can be used in numerical literal values greater than 999. That is, one thousand can be represented as either 1,000 or 1000 within a Python program.
(True/False)
4.8/5
(32)
In Python, the resulting value from a numeric calculation resulting in arithmetic underflow is
(Multiple Choice)
4.9/5
(41)
Showing 41 - 60 of 71
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)