function - SOLVED Python, Expected an indented block? One complication -


i'm trying make quick text based hockey team management game, whenever reference 1 of functions 'expected indented block'. not sure if i'm stupid , can't find mistake or something.

    def startup():         print "welcome text based hockey league!"         print "you tasked being team's general manager"         yourteam = raw_input()     class tbhl:         def __init__(self):             self.teamlist["mustangs", "wolves", "indians", "tigers", "bears", "eagles", yourteam]     class game:         def __init__(self, homescore, awayscore):             #games left in team class  startup() #<-the line error points tbhl = tbhl() print tbhl.teamlist[7] 

when have commented out block code function, use keyword pass prevent error. code block starts new line of indentation cannot left blank (or comments.)

... class game:     def __init__(self, homescore, awayscore):         #games left in team class         pass 

pass no-op please compiler when looks @ indentation level.


Comments

Popular posts from this blog

c++ - How to add Crypto++ library to Qt project -

jQuery Mobile app not scrolling in Firefox -

How to use vim as editor in Matlab GUI -