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

juan ramirez sells suits in a major department store on weekends. he earns a commission of 5 percent on the first ten suits, ahd if he sell more than ten, he ea
The ratio of boys to girls in WIN is 2:3. If there are 8 boys how many girls are there
Describe two characteristics shared by ecosystems that have high biodiversity
how many times will 21 go into 800? pls answer I'm very tired it's 12:00 am...
4.5, 3.8, 2.9, 3.2, and 2.3. What is the average (mean)?
what is 2x+3 and how did you get it
square root of 24 divided by the square root of 6
What is the solution set for 6x - 9 = 15 , given the replacement set {0, 1, 2, 3, 4,}?A: x = 4B: x = 3C: x = 2D: x = 1________________________________________2
HELP ASAP!!!!!!!!!!!
I need help on this problem badly...!!!
good job