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

Is the amount of water on earth always changing or is it a constant amount?​
Which compounds represent the product(s) in the chemical equation below? C3H8 + 5O2 → 4H2O + 3CO2 A) C3H8 B) 5O2 C) Both 4H2O and 3CO2 D) Only 4H2O
Read the passage. When Moritz was a freshman, he joined the school’s drama club in an attempt to overcome his fear of public speaking. Over the course of the ne
What would be the volume of a sample of Uranium with a mass of 1800g?
find the zeros of -16(x-4)(x+1)​
What is the cube root of 8
- 4X-10<2 i need help plzzzz​
Two species of lizard live on the same tree and consume the same sorts of food. Regardless, neither species is in direct competition with the other. The key to
What is the area of the triangle given in the picture?
The doctor said that __patients needed to leave the roomA.weB.us​