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

Literal equation v=knw solve for k
x + 10 = 60 - 10 = 60 - 10x = 40​
Of the 4 main types of biomolecules, this biomolecule is the most abundant in living systems. Group of answer choices nucleic acids proteins lipids carbohydrate
Pls help me find the answer pls :(
How can you find two ratios that describe the same relationship
L=4/3(C-30) solve for C literal equation
One species benefits and the other species is neither harmed nor helped. Both species benefit. One species benefits and the other species is harmed. A. para
1. About how much would it cost to buy 18 MP3 players? About how much would it cost to buy 18 CD/MP3 players? Electronics Prices DATA CD player $74.00 MP3 play
Which has a charge of +1? proton atom electron neutron
Patterns can also occur in nature. Recognizing those patterns can make it easier for the artist to recreate the scene in a drawing or painting. In this photogra