Filters
Question type

Study Flashcards

Select all that apply. Which of the following are steps in the program development cycle?


A) design the program
B) write the code and correct syntax errors
C) test the program
D) correct logic errors

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

Correct Answer

verifed

verified

In a print statement,you can set the __________ argument to a space or empty string to stop the output from advancing to a new line.


A) stop
B) end
C) separator
D) newLine

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

Correct Answer

verifed

verified

The line continuation character is a


A) #
B) %
C) &
D) \

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

Correct Answer

verifed

verified

D

A(n)__________ is a single task that the program must perform in order to satisfy the customer.

Correct Answer

verifed

verified

software r...

View Answer

What is the output of the following print statement? Print('The path is D:\\sample\\test.')


A) 'The path is D:\\sample\\test.'
B) The path is D:\\sample\\test.
C) The path is D\\sample\\test.
D) The path is D:\sample\test.

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

Correct Answer

verifed

verified

Select all that apply. Assume you are writing a program that calculates a user's total order cost that includes sales tax of 6.5%. Which of the following are advantages of using a named constant to represent the sales tax instead of simply entering 0.065 each time the tax is required in the code?


A) It will be easier for another programmer who may need to use this code to understand the purpose of the number wherever it is used in the code.
B) If the tax amount changes to 7.0%, the value will only have to be changed in one place.
C) It allows the end-user to always see the value of the sales tax.
D) It avoids the risk that any change to the value of sales tax will be made incorrectly or that an instance of the tax value might be missed as might occur if the number had to be changed in multiple locations.

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

Correct Answer

verifed

verified

In the expression 12.45 + 3.6,the values to the right and left of the + symbol are the __________.

Correct Answer

verifed

verified

A(n) __________ is a diagram that graphically depicts the steps that take place in a program?


A) flowchart
B) algorithm
C) source code
D) pseudocode

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

Correct Answer

verifed

verified

Comments in Python begin with the # character.

A) True
B) False

Correct Answer

verifed

verified

A flowchart is a tool used by programmers to design programs.

A) True
B) False

Correct Answer

verifed

verified

Which mathematical operator is used to raise 5 to the second power in Python?


A) /
B) **
C) ^
D) ~

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

Correct Answer

verifed

verified

What is the output of the following command,given that value1 = 2.0 and value2 = 12? Print(value1 * value2)


A) 24
B) value1 * value2
C) 24.0
D) 2.0 * 12

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

Correct Answer

verifed

verified

Computer programs typically perform three steps: input is received,some process is performed on the input,and output is produced.

A) True
B) False

Correct Answer

verifed

verified

After the execution of the following statement,the variable price will reference the value __________. Price = int(68.549)


A) 68
B) 69
C) 68.55
D) 68.6

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

Correct Answer

verifed

verified

The \t escape character causes the output to skip over to the next horizontal tab.

A) True
B) False

Correct Answer

verifed

verified

In Python,math expressions are always evaluated from left to right,no matter what the operators are.

A) True
B) False

Correct Answer

verifed

verified

Python uses __________ to categorize values in memory.

Correct Answer

verifed

verified

data types

The % symbol is the remainder operator,also known as the ___________ operator.

Correct Answer

verifed

verified

modulus,mod

A(n)__________ is a name that represents a value stored in the computer's memory.

Correct Answer

verifed

verified

Which of the following will display 20%?


A) print(format(20, '.0%') ) <enter>
B) print(format(0.2, '.0%') ) <enter>
C) print(format(0.2 * 100, '.0%') ) <enter>
D) print(format(0.2, '%') ) <enter>

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

Correct Answer

verifed

verified

Showing 1 - 20 of 40

Related Exams

Show Answer