Exam 2: Data and Expressions

arrow
  • Select Tags
search iconSearch Question
  • Select Tags

Numeric literals consist of only the digits 0-9, and optional ________ and _____________.

Free
(Short Answer)
4.9/5
(41)
Correct Answer:
Verified

sign, decimal point

The expression 4 + 3 is in

Free
(Multiple Choice)
4.8/5
(34)
Correct Answer:
Verified

B

Evaluate the following mathematical expressions as Python would evaluate them. 23 Evaluate the following mathematical expressions as Python would evaluate them. 23   5 24   3 7 // 5 7 / 5 2 ** 3 5 24 Evaluate the following mathematical expressions as Python would evaluate them. 23   5 24   3 7 // 5 7 / 5 2 ** 3 3 7 // 5 7 / 5 2 ** 3

Free
(Short Answer)
4.7/5
(42)
Correct Answer:
Verified

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 \quad \quad \quad \quad \quad N = int(input('Enter your age: '))

(Multiple Choice)
4.9/5
(34)

The default character encoding scheme of Python is _________.

(Short Answer)
4.8/5
(36)

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)

The / symbol is an example of a binary operator.

(True/False)
5.0/5
(26)

In Python, a string literal can contain

(Multiple Choice)
4.7/5
(39)

Which of the following contain the correct arithmetic operators in Python?

(Multiple Choice)
4.7/5
(38)

Unary operators are applied to a single operand.

(True/False)
4.8/5
(41)

Which of the following is not a valid variable identifier?

(Multiple Choice)
4.8/5
(29)

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? \quad \quad \quad \quad Number = 10 \quad \quad \quad \quad 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
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)