Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Interactive Python Calculator program.
- # Allows users to input a maths expression then prints out the answer.
- # Include in a loop to perform many equations.
- def exercise11():
- calculate = True
- user_input = ""
- while calculate == True:
- user_input = eval(input("Maths Expression: "))
- if user_input == "":
- calculate = False
- else:
- print(user_input)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement