Functions in Python

From Computer Science Wiki
Revision as of 11:11, 2 March 2016 by Bmackenty (talk | contribs) (Created page with " <syntaxhighlight lang="python" line="1" > def welcome(name): if name == "Alisher": likes_hamburgers ="yes" else: likes_hamburgers="no" return l...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)



def welcome(name):
    if name == "Alisher":
        likes_hamburgers ="yes"
    else:
        likes_hamburgers="no"
    return likes_hamburgers
    
print welcome("Bill")
print welcome("Alisher")    
print welcome("foo")