sanjayganeshkumar538 sanjayganeshkumar538
  • 03-10-2021
  • Computers and Technology
contestada

What is elif? How does it work in python?

Respuesta :

mxxnchxld
mxxnchxld mxxnchxld
  • 03-10-2021
it is the condition used after the if condition. say you use the if condition and you need to add another outcome, instead of using the if condition again, you’d use elif and end it with the else command.

example:

if num == 10:
print (“correct”)

elif num > 10:
print (“too high”)

else:
print (”too low”)

hope this helps :]
Answer Link
punk12394 punk12394
  • 03-10-2021
Use the elif condition is used to include multiple conditional expressions after the if condition or between the if and else conditions
Answer Link

Otras preguntas

What is the most appropriate transition to replace the word consequently in the beginning of second sentence? James steered his ship through high winds for thre
The whole is 8. One part is 8. What is the other part? Tell how you know.
Round 845,001 to the nearest ten thousand
Which equation represents the word sentence? The product of 6 and a number increased by 4 is 28. a. 6x + 4 + 28 b. 6x + 4 = 28 c. 6x – 4 = 28 d. 6x + 28 = 4
Which of these elements has four valence electrons
The Virginia Company wanted to find a route to the Pacific Ocean in order to trade with
Why did the Greek historian Herodotus show bias against the Persians
What role did noble women play in the reformation?
Jews were severely persecuted following the fall of this nation to the German army.
can Fresh fruit be contaminated by the water used to wash it.