#Simple Python Shell #Designed By: Wilson #Written By GPT-3 from math import * from cmath import * error_dict = { 'ZeroDivisionError': 'Cannot divide by zero.', 'NameError': 'Name not defined.', # Add other errors here } while True: user_input = input(">>> ") if user_input == "exit": break # Check if the input is an expression if any(char in "+-*/" for char in user_input): try: result = eval(user_input) print(result) continue except Exception as e: error_type = type(e).__name__ print(error_type) continue # For other code execution try: exec(user_input) except Exception as e: error_type = type(e).__name__ print(error_type)