WGU C173 SCRIPTING AND PROGRAMMING – FOUNDATIONS
FINAL PREP EXAM
1. Which operator should be used to determine if a number is evenly divisible b
g g g g g g g g g g g g g
y 5?
g
A+ g
B- g
C* g
D %: %
g g
2. A car drove 200 miles using 10 gallons of fuel.
g g g g g g g g g
Which operation should be used to compute the miles per gallon, which is 20?
g g g g g g g g g g g g g
A Addition
g
B Subtraction
g
C Multiplication
g
D Division: Division
g g
1g/g38
,3. ^^ A variable should hold a person's height in meters.
g g g g g g g g g
Which data type should the variable be?
g g g g g g
A Integer
g
B Float
g
C String
g
D Boolean: Float
g g
4. ^^ A variable should hold the names of all past U.S. presidents.
g g g g g g g g g g g
Which data type should the variable be?
g g g g g g
A Integer array
g g
B Float array
g g
C String array
g g
D Boolean array: String array
g g g g
2g/g38
,5. A program uses the number of seconds in a minute in various calculations.
g g g g g g g g g g g g
How should the item that holds the number of seconds in a minute be de- clared?
g g g g g g g g g g g g g g g
A Constant float userTime
g g g
B Variable float userTime
g g g
C Constant integer secondsPerMinute
g g g
D Variable integer secondsPerMinute: Constant integer secondsPerMinute
g g g g g g
6. A program determines if a user's age is high enough to run for U.S. presi-
g g g g g g g g g g g g g g
gdent. The minimum age requirement is 35.
g g g g g g
How should the item that holds the minimum age be declared?
g g g g g g g g g g
3g/g38
, A Constant integer minAge
g g g
B Variable integer minAge
g g g
C Constant integer 35
g g g
D Variable integer 35: Constant integer minAge
g g g g g g
7. Given integer x = 3 and integer y = 5.
g g g g g g g g g
What is the value of the expression ( x / 2.0) + y?
g g g g g g g g g g g g
A 5.0 g
B 6.0 g
C 6.5 g
7 7.5: 6.5 g g
8. Given float x = 10.2 and float y = 1.0.
g g g g g g g g g
What is the value of the expression x / y ?
g g g g g g g g g g
A 0.0 g
B 1.0 g
C 10 g
D 10.2: 10.2 g g
4g/g38
FINAL PREP EXAM
1. Which operator should be used to determine if a number is evenly divisible b
g g g g g g g g g g g g g
y 5?
g
A+ g
B- g
C* g
D %: %
g g
2. A car drove 200 miles using 10 gallons of fuel.
g g g g g g g g g
Which operation should be used to compute the miles per gallon, which is 20?
g g g g g g g g g g g g g
A Addition
g
B Subtraction
g
C Multiplication
g
D Division: Division
g g
1g/g38
,3. ^^ A variable should hold a person's height in meters.
g g g g g g g g g
Which data type should the variable be?
g g g g g g
A Integer
g
B Float
g
C String
g
D Boolean: Float
g g
4. ^^ A variable should hold the names of all past U.S. presidents.
g g g g g g g g g g g
Which data type should the variable be?
g g g g g g
A Integer array
g g
B Float array
g g
C String array
g g
D Boolean array: String array
g g g g
2g/g38
,5. A program uses the number of seconds in a minute in various calculations.
g g g g g g g g g g g g
How should the item that holds the number of seconds in a minute be de- clared?
g g g g g g g g g g g g g g g
A Constant float userTime
g g g
B Variable float userTime
g g g
C Constant integer secondsPerMinute
g g g
D Variable integer secondsPerMinute: Constant integer secondsPerMinute
g g g g g g
6. A program determines if a user's age is high enough to run for U.S. presi-
g g g g g g g g g g g g g g
gdent. The minimum age requirement is 35.
g g g g g g
How should the item that holds the minimum age be declared?
g g g g g g g g g g
3g/g38
, A Constant integer minAge
g g g
B Variable integer minAge
g g g
C Constant integer 35
g g g
D Variable integer 35: Constant integer minAge
g g g g g g
7. Given integer x = 3 and integer y = 5.
g g g g g g g g g
What is the value of the expression ( x / 2.0) + y?
g g g g g g g g g g g g
A 5.0 g
B 6.0 g
C 6.5 g
7 7.5: 6.5 g g
8. Given float x = 10.2 and float y = 1.0.
g g g g g g g g g
What is the value of the expression x / y ?
g g g g g g g g g g
A 0.0 g
B 1.0 g
C 10 g
D 10.2: 10.2 g g
4g/g38