Wednesday, June 25, 2014

Day 81

Explored Python at CodeCademy. Worked on Python tutorial 13 of 15, Conditionals & Control Flow, Else Problems, I Feel Bad for You, Son...! Some practice with "else" statement.

The code used:
answer = "'Tis but a scratch!"

def black_knight():
    if answer == "'Tis but a scratch!":
        return True
    else:             
        return False

def french_soldier():
    if answer == "Go away, or I shall taunt you a second time!":
        return True
    else:             
        return False

There was no interaction for this code:

No comments:

Post a Comment