Ask Question
23 July, 06:41

Assuming the user enters integers, how many times will the following program print hi x = int (input ()) y = int (input ()) if x > 0 or y > 0: print ("hi") if x < = 0 and y < = 0: print ("hi")

+2
Answers (1)
  1. 23 July, 08:13
    0
    It prints "hi" only one time.

    Explanation:

    It will print the result depending on the if statements. If you look at the if statements, you will see that no matter you enter it is going to be either true for the first if statement or for the second if statement.

    Let's say you entered 1 for x and 0 for y, first if statement will print hi, but the second one will not print because x is not smaller or greater than 0.

    Let's say you entered 0 for x and 6 for y, second if statement will print hi, but the first one will not print because x is not greater than 0.
Know the Answer?
Not Sure About the Answer?
Get an answer to your question ✅ “Assuming the user enters integers, how many times will the following program print hi x = int (input ()) y = int (input ()) if x > 0 or y > ...” in 📙 Computers & Technology if there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers