Forked from Cyborg-Model-Z/gist:520f0a13c19aa5a4950df80355912839
Last active
March 8, 2019 17:03
-
-
Save Camsbury/1bafd1a56c4575f7720380f001b19f74 to your computer and use it in GitHub Desktop.
Swamp 1.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print ("Hello") | |
#Set the frogs variable | |
frogs = 2 | |
print ("Here are {} frogs".format(frogs) | |
suggestion = "Let's breed them" | |
respect = ", don't watch it's rude" | |
initialization = (suggestion + respect) | |
def double_frogs(frogs): | |
"""Doubles your frogs!""" | |
print (initialization) | |
return frogs * 2 | |
#Call with the frogs variable | |
frogs = double_frogs(frogs) | |
print("You now have {} frogs!".format(frogs)) | |
#Updated to do what the messages say | |
print("Let's try a new food") | |
print("Pool sanitized") | |
frogs = 0 | |
print("Here are 3 fresh frogs and the new food") | |
frogs += 3 | |
def triple_frogs(frogs): | |
"""Triples your frogs""" | |
return frogs * 3 | |
#reuse the frogs variable to actually triple your frogs | |
print("you now have " + str(triple_frogs(frogs))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment