[Tutor] defining functions and classes

Alan Gauld alan.gauld at btinternet.com
Sat Jan 15 13:11:41 CET 2011


"Brett Murch" <brettmurch at gmail.com> wrote

> game but am having trouble with classes and funtions. I want to 
> create a
> class or function where someone creates a charater and has a choice 
> of
> their name or os. This is what I have so far;
>
> class Administrator():
>    def Skills(name,os):

OK, You have a ways to go to undertsatand classes so give up on that
and focus on functions for now. You need to underestand functions well
before you start messing with classes.

> I keep getting a syntax error on calling it. any ideas on what I'm 
> doing
> wrong? Should it not be a class and should I just define it as a
> function or what?

Yes, just make it a function for now.
Life will be easier.


-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/




More information about the Tutor mailing list