223k views
4 votes
Which response best completes the following if-else statement? If the answer is green, then say "go!", else say "________".

1) Blue
2) Red
3) Stop
4) Turn

1 Answer

3 votes

Final answer:

The best response to complete the if-else statement is option 3) Stop. This means that if the answer is neither green, blue, nor red, the program will say 'Stop'.

Step-by-step explanation:

The best response to complete the if-else statement is option 3) Stop.

This means that if the answer is neither green, blue, nor red, the program will say 'Stop'.

For example:

if (answer == 'green')
print('go!')
else
print('Stop')
User Daniel Darabos
by
8.3k points