Filters
Question type

Study Flashcards

In Python, % is the exponentiation operator.

A) True
B) False

Correct Answer

verifed

verified

When the Python interpreter evaluates a literal, the value it returns is simply that literal.

A) True
B) False

Correct Answer

verifed

verified

Exponentiation and assignment operations are left associative.

A) True
B) False

Correct Answer

verifed

verified

A variable associates a name with a value, making it easy to remember and use the value later in a program.

A) True
B) False

Correct Answer

verifed

verified

What is the total number of distinct values in the ASCII set?


A) 64
B) 128
C) 256
D) 512

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

Computer scientists refer to the process of planning and organizing a program as software development.

A) True
B) False

Correct Answer

verifed

verified

In Python, what does the "%" operator do in the expression 6 % 4?


A) It performs an exponentiation to the 4th power.
B) It returns a remainder or modulus.
C) It returns a float as a result of division.
D) It returns the percentage of the operation.

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

In general, a variable name must begin with either a letter or an underscore (_).

A) True
B) False

Correct Answer

verifed

verified

In evaluating the precedence rules used by Python, what statement is accurate?


A) Exponentiation has the highest precedence.
B) Multiplication is evaluated before unary multiplication.
C) Addition and subtraction are evaluated after assignment.
D) Exponentiation and assignment operations are left associative.

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

In the waterfall development model, what is the most expensive part of software development?


A) The design phase.
B) The integration phase.
C) The maintenance phase.
D) The analysis phase.

E) B) and C)
F) All of the above

Correct Answer

verifed

verified

Expressions provide an easy way to perform operations on data values to produce other data values.

A) True
B) False

Correct Answer

verifed

verified

What statement accurately describes what a semantic error is?


A) A semantic error is the result of an expression that is syntactically incorrect.
B) A semantic error occurs when an expression is syntactically correct, but the expression cannot be carried out.
C) A semantic error happens when an expression attempts to perform operations between incompatible data types.
D) A semantic error is the result of an improperly nested if statement.

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

The cost of developing software is spread equally over the phases.

A) True
B) False

Correct Answer

verifed

verified

Modern software development is usually incremental and iterative.

A) True
B) False

Correct Answer

verifed

verified

The modulus operator has the highest precedence and is evaluated first.

A) True
B) False

Correct Answer

verifed

verified

Which of the following is NOT a valid name that can be used for a variable?


A) total
B) 1ending
C) propertyValue
D) TEST

E) B) and C)
F) None of the above

Correct Answer

verifed

verified

Python is a loosely typed programming language.

A) True
B) False

Correct Answer

verifed

verified

What are the two different means by which a floating-point number can be written? (Choose two.)


A) decimal notation
B) line notation
C) scientific notation
D) octal notation

E) B) and D)
F) A) and B)

Correct Answer

verifed

verified

What effect does the following print statement have? print("Hello" * 5)


A) The string "Hello" is converted into an int type of value 1 and then multiplied by 5, producing "5".
B) The string is indexed and the character count is multiplied with the total number of characters in the string, producing "25".
C) The print statement produces a type error as you cannot multiply a string type with an integer type.
D) The print statement will produce "HelloHelloHelloHelloHello".

E) B) and C)
F) C) and D)

Correct Answer

verifed

verified

Which of the following literals would be considered a float type in Python?


A) -1
B) 3.14
C) '88'
D) 5

E) None of the above
F) A) and D)

Correct Answer

verifed

verified

Showing 21 - 40 of 50

Related Exams

Show Answer