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

Medications taken for the treatment of depression __________. A. can be easily purchased at any store B. begin to reduce depression immediately C. must be monit
8x greater than -96 and I forget how to solve it
Martin Luther King, Jr., believed that a) America should not change its policies about Vietnam b) the war was hurting both poor blacks and poor whites c) more A
How did the conferences at Dumbarton Oaks and Yalta attempt to shape the postwar world?
What are the 3 most populated cities in texas?
A stem has nodes and internodes. Which of the following features helps identify nodes on a stem? the presence of buds on the nodes the origin of roots from node
The _ regulates public drinking water, and approves pesticides and other chemicals used in the environment.
identify the elements in the compound NaCl.
Zero is a divisor. always sometimes never
the ratio of the side of two similar cubes is 3:4 the smaller cube has a volume of 729 what is the volume of the larger cube