Ask Question

Given the following program segment, what is the test condition?

Write "Enter your response (Y/N) "

Input Answer

If Answer = = "No" Then

Write "Try Again"

Input Answer

End If

Write "Are you having fun yet? (Y/N) "

Input Response

a. Answer

b. Answer = = "No"

c. Response

d. Answer = "Y"

+5
Answers (1)
  1. 28 April, 15:41
    0
    B. Answer = = "No"

    Explanation:

    The test condition from the code segment is If Answer = = "No". The if-statement checks to see if the user input (Answer) equals "No", if it is then the code display "Try Again" and request the user to enter another input (Answer).

    The general pattern for writing an if-statement is:

    if (condition) then expression

    The condition represent the test condition.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Given the following program segment, what is the test condition? Write "Enter your response (Y/N) " Input Answer If Answer = = "No" Then ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers