What does the input need to be for the output of this program to be “Try again!”? INPUT num IF num < 10 AND num > 30 THEN OUTPUT "Good!" ELSE OUTPUT "Try again!" (1 point)

1 answer

To get the output "Try again!", the input value num must not satisfy the condition in the IF statement. The condition states that num should be less than 10 AND greater than 30 simultaneously, which is logically impossible. Therefore, any input value will yield "Try again!" as the output.

However, if you specifically want to explore cases that definitely trigger "Try again!", you can choose any value:

  • Example inputs that would output "Try again!":
    • 9 (because it's not greater than 30)
    • 30 (because it's not less than 10)
    • 31 (because it's not less than 10)
    • Any number below 10 or above 30

In conclusion, the input can be any number not simultaneously less than 10 and greater than 30 (which is impossible), so any number will work to output "Try again!".