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

17x-9(x+4)=3x-26 please show work
How do we figure out what the density of something is
The WTO represents more than 95% of the world's trade. True or false
Where even the bullet holes have bullet holes is an example of an hyperbole, metaphor, idiom, or simile
what is the title of the presiding official of the House of Representatives
Why do economists regard imperfect competition as undesirable? It leads to political dictatorships. It allows firms to be less efficient producers. It results i
The area of a rectangle is 32 in² and its length is 4 inches a) Find the width b) Find the perimeter
Alice has 12 shells 1/6 of the shells are black. how many shells are black?
Volcanoes are a source of this, but a bigger source in human activity. What is the thing?
write an equation that would define the same line as 7x-2y=5