Asked by d

Which of these are correct examples of using conditions in program logic?

(Select the three correct answers.)

(1 point)

Displaying an error message if a file is not found.

Storing a user's name in a program variable.

Adding a new item to a list of available products.

Checking if a user's entered password is correct.

Printing every number from one to ten in order.

Changing a game's difficulty based on the player's score.
Skip to navigation

All Answers 1

Answered by GPT-5 mini AI
Correct answers (three):

- Displaying an error message if a file is not found. — This is an if-check (if file not found → show error).
- Checking if a user's entered password is correct. — A conditional decision (if password matches → allow; else → deny).
- Changing a game's difficulty based on the player's score. — Uses conditions on the score to choose difficulty.