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 Linkedin and how you can look for jobs and network with others in your career field?
Who is Hinduism founder
Mystery stories and action stories depend heavily on A-setting B-character C-plot
Choose the correct time expression to complete each statement. Se comunicaban por correo electrónico ___________. ​ Options: A. anoche B. todas las noche
which system of inequalities is shown​
Find the length of RJ
What is the area of parallelogram ABDC O12 cm O15 cm O20 cm O24 cm
The preferred way to complete the FAFSA is: A. by fax B. online c. by mail. D. over the phone
Explain the possible problems associated with the high diastolic pressure.
what is the molarity of NaOH solution of 112 g of NaOH dissolved in 0.750 L of solvent