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
Numeric literals consist of only the digits 0-9, and optional ________ and _____________.
Free
(Short Answer)
4.9/5
(41)
Correct Answer:
sign, decimal point
Evaluate the following mathematical expressions as Python would evaluate them.
23
5
24
3
7 // 5
7 / 5
2 ** 3


Free
(Short Answer)
4.7/5
(42)
Correct Answer:
3
0
1
1.4
8
When assigning a variable a value, the variable name is placed on the right side of the assignment operator.
(True/False)
4.8/5
(34)
What value is assigned to variable n by the following input statement
N = int(input('Enter your age: '))
(Multiple Choice)
4.9/5
(34)
An identifier in Python is a sequence of one or more characters which must begin with a letter or a digit.
(True/False)
4.8/5
(36)
The number of characters that can be defined in the Unicode character encoding scheme is
(Multiple Choice)
4.7/5
(28)
Which of the following contain the correct arithmetic operators in Python?
(Multiple Choice)
4.7/5
(38)
Indicate the purpose of the backslash character (\) in the following.
numsecs_1900_dob 5 ((year_birth 2 1900) * avg_numsecs_year) 1 \
((month_birth 2 1) * avg_numsecs_month) 1 \
(day_birth * numsecs_day)
(Short Answer)
4.8/5
(42)
There is no practical limit to the size of an integer in Python.
(True/False)
4.9/5
(30)
The following is a valid assignment statement for variable n.
n = n + 1
(True/False)
4.7/5
(33)
The operator precedence of a given programming language does not have to necessarily be the same as in mathematics.
(True/False)
4.9/5
(41)
Truncating division performed on integer operands is referred to as ___________________.
(Short Answer)
4.8/5
(43)
What is value of variable number after the code has been executed?
Number = 10
Number = number + 1
(Multiple Choice)
4.9/5
(31)
Like most programming languages, Python uses static typing when determining a variable's data type.
(True/False)
4.9/5
(37)
Showing 1 - 20 of 71
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)