radomes.openskiesproject.org
Anonymous Anonymous
  • 02-01-2016
  • Computers and Technology
Answered

Python Elif Function

Verified Answer :

Neuron
Neuron Neuron
  • 03-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

Related Questions

1 a baker had 10 sacks containing the following amounts of flour 4 12 kg 314 kg 2 12 kg 2 12 kg 4 kg 3 14 kg 4 14 kg 5 kg 2 12 kg 3 14 kg 2 plot the measurement
what was the major issue that led to the debate
which best defines homeostasis
What is 3 38 X 4 13 express answer in simplest form thanks in advance
how do heart and lungs work together
if the probability of a win is 002 and the probability of a draw is 08 what is the probability of a loss i have asked this once before and the person who answer
explain how the citizens can actively participate in the national government
What value of $x$ makes this equation true? $-2 x+3=-15$ $x=$
Water moves from Earths surface to the atmosphere and back to Earths surface again in a process known as the water cycle Which of the following is the major for
There are 25 servings in 284ounce jar of peanut butter How many ounces of peanut butter are there in 1 serving