Seudónimo Seudónimo
  • 02-01-2016
  • Computers and Technology
contestada

Python Elif Function

Respuesta :

Neuron
Neuron Neuron
  • 04-01-2016
The python elif function is a part of the if loop and can be used when we have more than two conditions. Usually, you would want to do something like this:

def random_function(variable):
   if variable equals 10:
      return y
  elif variable equals 11:
      return x
  else:
     return z.

As you can see, with this you can control for the different things that variable can stand for. 

I wrote this in pseudocode so it's easier to understand :)

Answer Link

Otras preguntas

What is the primary of a linking word or sentence
If you want to be a professor, but you only have a master's degree, where can you most likely teach? a public university I a community college a college founded
Why might Qin Shi Huangdi have wanted to suppress historians?​
In an examination Alan obtained 32 out of 40 marks. In another examination Ben obtained ⅝ of the total marks.Express the marks of each candidate as a percentage
The Magna Carta, in establishing certain rights and protections of medieval barons against arbitrary rule by the English King, was a document important for esta
3. Why did the King need to pass this Act ?
Window cleaner is ammonia dissolved in water. What is this an example of? a solution a solute a solvent a precipitate
What is the circumference
one less than the product of a number and 3 is 5 more than the number it self
Please Help! Brainliest Answer! Thank you