FOUNDATIONS: ACTUAL EXAM QUESTIONS WITH
CORRECT ANSWERS | LATEST UPDATE 2026-2027 |
GRADED A+ | GUARANTEED PASS| 100% SOLVED
What entire output appears after three successive calls to F()?
A Hey
B HHHey
C HeyHeyHey
D Hey Hey Hey - Correct Answer-C
Which expression evaluates to true only when the user is within 3 years of 21
years, given a variable x containing a user's age?
A x >= 18) or ( x <= 24)
B ( x >= 18) and ( x <= 24)
C ( x < 18) or ( x > 24)
D ( x < 18) and ( x > 24) - Correct Answer-B
Which data type is used for items that are measured in length?
A Integer
B Float
C String
D Boolean - Correct Answer-B
Which data type should be used to keep track of how many planes are in a hangar?
A Integer
,B Float
C String
D Boolean - Correct Answer-A
What is a valid user-defined function name?
A A reserved word
B Any valid identifier
C Any variable name
D A floating-point number - Correct Answer-B
A function MyFct has an input x and an output z.
What does MyFct return?
A Nothing
B x only
C z only
D x and z - Correct Answer-C
What is the return value of a function?
A Output of a function
B Call to run the function
C Data passed to the function
D Variable in the declaration of the function - Correct Answer-A
A program should continue accepting input numbers, adding each to a sum, until a
0 is input.
,Which control structure should be used?
A If statement
B For loop
C Multiple if statements
D While loop - Correct Answer-D
Joe is building an online game. He wants to provide a riddle and have the player
guess the answer. The game needs to prompt the user to enter the answer, check to
see if it the input provided does not match the correct answer, and continue
prompting the user until the answer entered matches the correct answer.
Which control structure supports Joe's needs?
A For loop
B While loop
C Do-while loop
D If-else branch - Correct Answer-C
What is put to output by the following pseudocode?
x = 3 do
Put x to
output
Put " "
to
output
, x=x-1
while x
> 0A3
210
B 3 2 1 0 -1
C210
D 3 2 1 - Correct Answer-D
A programmer has developed the following code:
count = 0 while count is
less than 5:
print 'Hello'
What is the result of implementing this code?
A 'Hello' will print four times.
B 'Hello' will print five times.
C The program will throw an error.
D 'Hello' will print indefinitely. - Correct Answer-D
What does a programmer do first to use an existing programming library? -
ANSWER : Include the library
What relationship is common among a programming library's functions? -
ANSWER : Functions all relate to the same purpose.