0

I only want a simple python calculator script. I named it calc.py. I just want it to take a keyboard input from the user. E.g. 7/4*6 Then print it: print(7/4*6). The example should return 10.5. However, this is my code. It takes the input as a string so it just prints 7/4*6, not 10.5.

#!/bin/python3

answer=input("Type an arithmetic operation: ")

print(answer)

So I want to convert the answer into a standard input.

Talha Tayyab
  • 8,111
  • 25
  • 27
  • 44
billy.51
  • 1
  • 1

0 Answers0