simbamillions1087 simbamillions1087
  • 07-09-2020
  • Computers and Technology
contestada

If-else expression: Operator chaining.
Write an expression that will print "in high school" if the value of user_grade is between 9 and 12 (inclusive).
Sample output with input: 10
in high school

Respuesta :

frknkrtrn
frknkrtrn frknkrtrn
  • 09-09-2020

Answer:

user_grade = int(input())

if 9<= user_grade <= 12:

   print("in high school")

Explanation:

*The code is in Python.

Get the input from the user and assign it to the  user_grade

Check the value of the  user_grade using if structure. If it is between 9 and 12 (inclusive), print "in high school" message

Answer Link

Otras preguntas

The Townshend Act placed a tax upon
The big change in abortion laws came with the 1973 Supreme Court decision in ___________.
True of false the federalists promised a bill of rights to ensure ratification of the constitution
Which is a renewable energy resource? coal petroleum wind natural gas
Which is the graph of f(x)=100(0.7)^x
How do you think this resolution influenced later u.s. policy in Southeast Asia? gulf of tonkin resolution?
A pizza parlor offers mushrooms, green peppers?, onions?, and sausage as toppings for the plain cheese base. how many different types of pizzas can be? made?
Look at the five words you selected to study during this lesson. Use the first one in an original sentence. In a second sentence, explain how you have used this
When did christianity become official religion of roman empire?
Which describes the slope of this line?