Iteration — Unit test Answers

7 verified answers1 views
21
Free Preview

A looping construct that continues to repeat until the expression becomes false is

A
a while loop.
B
a for loop.
C
an infinite loop.
D
a pass loop.
23

The data that a function takes in is called

A
a return value.
B
syntax.
C
an argument.
D
output.
24

The admission booth at the show requires each person to enter their age. Then the following program executes:if 22 > age > 14: print (“Student price is $8.”)When age = 16, what action would the program execute?

A
print “16”
B
print “Student price is $8.”
C
print “14”
D
print “Student price is $14.”
25

Variables differ from values in that

A
variables are always letters of the alphabet and values are always numbers.
B
a variable is a symbol or a placeholder while a value is assigned to a variable as the result of a function.
C
a variable is accessible from anywhere in a program while a value is accessible only in one situation.
D
a variable is defined by the programmer while a value is defined by the program.

Did you find these answers helpful?