madisonsmithren
madisonsmithren madisonsmithren
  • 24-01-2020
  • Computers and Technology
contestada

What is output?
x = 21
if (x > 21):
print (1)
elif (x < 21):
print (2)
else:
print (3)

Respuesta :

Limosa
Limosa Limosa
  • 29-01-2020

Answer:

The output of the following code is 3.

Explanation:

In the following Python Programming Language, the output is 3 because the variable x is equal to 21, then the user check the condition is the variable x is greater than 21 then print it print 1, otherwise the user check that the variable x is less than 21 then print 2, otherwise it print 3. So, the variable x is not greater than 21 or not less than 21, it is equal to 21. That's why the code execute the else block and print 3.

Answer Link

Otras preguntas

please help! asap! (photo)
Write two sentences in French comparing the two cars. Be sure to use an expression of comparison such as plus que, moins que, mieux que, etc. Pls help!
Determine whether the ordered pair (10, 4) is a solution to the equation 3x – 5y = 10 Yes, (10,4) is a solution. No, (10,4) is not a solution.
please help me solve this
FIND THE AREA OF THE SEGMENT AYB. IF RADIUS OF THE CIRCLE IS 21cm AND ANGLE AOB= 120 DEGREE ( use pie= 22/7)PLZ answer very urgent
Pls help me I have no idea
What is y in this situation?
Should the US ever engage in torture? Why or why not? (for the best response you will get top brainiest and 5 stars)
calculate the number of moles of nitrogen gas present in 400cm3 sample of it a pressure of 790 mmHg and 27°C.​
Plz somebody help me ?