Question: Organize the lines of code to create an if - else statement that describes an object. If the input is 1 0 , then isBalloon

Organize the lines of code to create an if-else statement that describes an object.
If the input is 10, then isBalloon is true and isRed is false, and the output is:
Balloon
If the input is 11, then isBalloon is true and isRed is true, and the output is:
Red balloon
Otherwise, the output is:
Not a balloon
Note: This activity includes distractors. Not all lines of code on the left will be used in the final solution.Organize the lines of code to create an if-else statement that describes an object.
If the input is 10, then isBalloon is true and isRed is false, and the output is:
Balloon
If the input is 11, then isBalloon is true and isRed is true, and the output is:
Red balloon
Otherwise, the output is:
Not a balloon
Note: This activity includes distractors. Not all lines of code on the left will be used in the final solution.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!