0

I have a python script that does incorrect math. here it is:

from random import randint
while 1==1:
    try:
        exp = input()
        if exp=="1+1":
            print("=3")
        else :
            answer = exp
            while answer == exp:
                answer = randint(0, exp+10)
            print(answer)
    except Exception as e:
        print(e)
        print(259)

when i run it, I get an error:

Traceback (most recent call last):
  File "/Users/the_name_of_my_home_folder/Documents/the name of the file.py", line 1, in <module>
    from random import randint
ImportError: bad magic number in 'random': b'\x03\xf3\r\n'

I am using python 3.5.1 on a mac.

hexagonNoah
  • 149
  • 1
  • 9

0 Answers0