This file contains hidden or 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
| # NB optimized for Python 3 | |
| from random import randint | |
| print ('Hello, I am a talking calculator and my name is Jester.') | |
| name = input('What is your name? ') | |
| print ('Hello ' + name.capitalize() + ', nice to meet you!') | |
| while True: | |
| operation = input(name.capitalize() + | |
| ', would you like to add or subtract? (enter "a" or "s"; "q" to quit) ') |