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
| from random import randint | |
| import math | |
| while True: | |
| input1 = input("Enter a line of calculations to do (e.g. 1+3+5-3, 5*7/3+4, 5^7) \n alternatively type sin, cos or tan : ") | |
| if input1 == "random": | |
| try: | |
| print(randint(int(input("Enter the minimum number: ")), int(input("Enter the maximum number: ")))) | |
| except: | |
| print("Invalid input. Please try again.") | |
| elif input1 == "sin": |