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

help!! part b please!!
Speed training improves your neuromuscular activity. true or false
$24,000 for new Honda, 2.75% interest rate for 4 years. What is the monthly payment? ( Explanation needed)
Helllp and show all the work n o troll answer plz and if you don’t feel like doing the work plz don’t answer plz
Solve for X......:) <3
Find the values of x and y​
In Pennsylvania, what must trappers who wish to use cable restraint traps do? Demonstrate a need to use this type of trap rather than others. Practice first on
Please complete this and part 2 (already posted) im "Yo" form please and thank you Help Asap
Which piecewise function is shown in the graph?​
Find −3 1/5 ÷ 1 3/4. Write your answer as a mixed number in simplest form.