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

I will mark brainlist please help 1) what is the subject of a sentence? • the verb • tells who or what the sentence is about • the action in the sentence 2)
Find the slope of the line that passes through the pair of points. (9, 8), (7, -8)
Ano ang ipinapahiwatig ng pangungusap patungkol kay Alexander? *
Anyone who knows Hindi Grammar Visheshan, please explain this to me. its in the attachment​
The sum of two numbers is 20 and their difference is 12.
PLEASE HELPIf you can answer this please look at my other questions related to preforming transformatioms​
Can you help me please
How can you apply content and context analysis of primary sources in hospitality industry?
A ball is dropped from a height of 1m. If the coefficient of restitution between the ball and the surface is 0.6, what is the height the ball rebounds to?​
who is the chairperson of the village Council​