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

Pls help asap! Due in 5 minutes!!! Pls
whose name is spelled differently on the stanley cup
1. Which angle is complementary to angle BAC?
How to make hydroxyquinoline with grapefruit and lemon.
so if bob spilt 5.9 milk in a cup how much milk does he have
The Carter family has 12 cousins. Three of the cousins live in Chicago, five of the cousins live in Detroit, and the rest live in New York. What ratio of the co
Can someone solve this for me using proofs?
fred went to pick oranges at a cutrus farm.He picked 5 bushels of oranges and paid $31.75. How much would it cost to pick 7 bushels of oranges?Helpp​
HELP ME please U-U I'll GIVE BRAINLEST Which of these is NOT a region of Argentina? Patagonia Pampas Paraná Plateau Gran Chaco
Bobby sherman, a 36-year-old male, cut his left thumb at work on a construction site 2 weeks ago