animexcartoons209
animexcartoons209 animexcartoons209
  • 25-04-2020
  • Computers and Technology
contestada

Can anyone please help with this programming code in python num= 7 if num > 3: print(“3”) if num < 5: print(“5”) if num == 7: print(“7”) and please explain step by step cause I’m confuse

Respuesta :

alexzorrilla0301 alexzorrilla0301
  • 25-04-2020

Answer:

The program will print out:

3

7

Explanation:

Let's replace "num" with what this variable is defined to in all of you if statements.

First if statement:

if 7 > 3:

 print("3")

Result: 7 is indeed greater then 3, so it will print "3"

Second if statement:

if 7 < 5:

 print("5")

Result: 7 is not less than 5, so it will not print "5"

Third if statement:

if 7 == 7:

  print("7")

Result: 7 is equal to 7, so it will print "7"

Answer Link

Otras preguntas

Which is the most appropriate unit of measurements to use to measure the thickness of a quarter? Elaborate. A.) meters B.) Kilometers C.) Centimeters D.) Millim
why is it important to know your variables when conducting an investigatory problem  ?
solve for r F= k (m1m2/r^2)
Hey there this is Japanese What is the meaning of :1) sugoi2) takai
How and why did the antislavery movement become more radical over the period 1815 to 1860?
solve for r F= k (m1m2/r^2)
when it is winter in europe, what season is it in asia and why?
What is the algebraic expression for this story problem?A tank is filling with water from a natural spring well. Two days ago the water was 10 feet deep, and ye
I need help on this question please help?
The time t required to drive a certain distance varies inversely with the speed r. If it takes 2 hours to drive the distance at 40 miles per hour, how long will