i'm a school teacher writing an addition app using Python. It was going ok but i didn't like the editor so i found a new one(NetBean6.5). i copied/pasted my code but the NBeans editor is looking for a "main" module... i've done a little c++ so i understand what it's looking for but i don't know where to put it or what it should look like. Below i the code i copied from the python.org editor.
can some one tell/show how/where to setup "main"?
for i in range(2):
addString = input('What addition table do you want to use ')
addTable = int(addString)
tryAgain ='Try again'
correct = 'CORRECT!'
import random
add1 = random.randrange(1,10,1)
print (addString +' + '+ str(add1)+ ' = ' )
stuAnswer= input()
stuInt= int(stuAnswer)
answer = (addTable+add1)
while answer !=stuInt:
print (tryAgain)
print(addString+' + '+str(add1)+' = ')
stuAnswer= input()
stuInt = int(stuAnswer)
answer = (addTable+add1)
else:
print (correct)
print (str(stuAnswer))
print( addTable+add1)