Created
October 24, 2017 17:15
-
-
Save joetechem/8dab08f959052ea0d13f6285e5bdb1d4 to your computer and use it in GitHub Desktop.
Writes the answer when a simple calculator program is run
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
import turtle | |
number1 = int(raw_input("Give me a number: ")) | |
number2 = int(raw_input("Give me another number: ")) | |
operation = raw_input("Give me an operator:" ) | |
if operation == '+': | |
a = number1 + number2 | |
elif operation == '-': | |
a = number1 - number1 | |
elif operation == '*': | |
a = number1 * number1 | |
elif operation == '/': | |
a = number1 / number1 | |
frank = turtle.Turtle() | |
frank.write(a, move = True, font = ("Arial", 100, "bold")) | |
turtle.mainloop() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment