Traceback (most recent call last):
File "C:\Python27\ex043Map.py", line 15, in <module>
p1=Map("","")
File "C:\Python27\ex043Map.py", line 8, in __init__
print"Hello {}. Select one of the options".format(main_Menu)
NameError: global name 'main_Menu' is not defined
class Map(object):
mainMenu=['start game','quit']
def __init__(self,start_scene,name):
self.start_scene=start_scene
self.name=name
print"Welcome to my game please enter your name"
name=(raw_input())
print"Hello {}. Select one of the options".format(main_Menu)
def start_scene(self,mainMenu):
main_Menu=['start game','quit']
p1=Map("","")
p1.start_scene

New Topic/Question
This topic is locked


MultiQuote


|