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

TESTOSTERONE DIRECTLY AFFECTS THE
What is the slope of the line that contains the points (3, 4) and (1, 2)? A. 1 B. –1 C. D.
What is the GFC of 40 and 50
Ben walked 2/5 mile.Tonya walked 1/4 mile.What fraction of a mile did they walk in total?
Farmers looking to grow large quantities of food quickly would utilize plants that reproduce _____.
Montesquieu's most lasting contribution to politcal thought was his
what was the basic cause of the Punic wars
In what direction will this arrow point after it is rotated 270 degrees counterclockwise
Which scene from beowulf reading is a flashback?
Dalton's dad rode his bike 1 kilometer north, 1 kilometer west, 1 kilometer south, and 2 kilometers east. How many total kilometers will Dalton's dad ride