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

To open a combination lock, you turn the dial to the right and stop at a number; then you turn it to the left and stop at a second number. Finally, you turn the
Complete this equation and balance it
Consider the following step of a reaction mechanism. A+B___>D+E (slow) Which statement identifies a reaction intermediate? A, if it is used in a later step B
what is a pen picture
What would happen when two or more capacitors are connected in series across a potential difference, then
According to Thomas Jefferson what was the point of government?
Substitute 7 for x and evaluate the expression below. 9x - 2x
Radium decays exponentially; it has a half-life of 1,600 years. Find a formula for the amount, q(t), remaining from 70 mg of pure radium after t years. q(t) = A
Blood pressure is highest in the______ and lowest in the____
A ray in air hits the surface of water at 41.0 deg. At what angle does it travel in the water? (Unit=deg)