I have a .py script that runs perfectly in TextWrangler but will not work when I try to imported into Terminal or IDLE. I keep getting this error message:
Traceback (most recent call last):
File "stdin", line 1, in "module"
File "c.py", line 1
bookic08ic14x.is32
I have no idea what this means. I always make sure that I am in the correct directory before I make the import.
My code looks like the following:
def choice():
import random
print "This program decides who has to do the job"
n = input("How many people are there?:")
people = []
for i in range (1, n+1):
subject = raw_input("Person %s:" % i)
people.append(subject)
print random.choice(people)
choice()
Also if anyone has suggestions for making this code better I am open to that!