Variables and Data Types Answers

4 verified answers1 views
1
Free Preview

Which statements describe an If statement? Check all that apply.

A
A conditional If statement is used when the programmer wants decision-making included in the code.
B
A conditional If statement executes code when the condition returns a value of false.
C
A conditional If statement executes a piece of code when one statement is false and the following statement is true.
D
A conditional If statement tests whether the condition following it is true or false before executing a specified part of the code.
2
Free Preview

Which action will be taken for a grade of 95?

A
No action will be taken.
B
Go ice skating with friends.
C
Repeat the quiz.
D
Go ice skating by myself.
3

What action would the program execute if fruit_number = 0?

A
It would print “1.”
B
It would print “Apples.”
C
It would not print a message.
D
It would print “0.”
4

Which choice best describes an If statement?

A
a conditional statement that tests whether the condition following it is true or false, then executes the part of the code that corresponds with that result
B
a conditional statement that tells a program to do something only if the answer to the expression is true
C
a conditional statement that executes a piece of code when one statement is false
D
a conditional statement that executes a piece of code whenever an If appears

Did you find these answers helpful?

Variables and Data Types Answers — Introduction…