[Tutor] defining functions and classes

Brett Murch brettmurch at gmail.com
Sat Jan 15 11:10:15 CET 2011


Hi everyone,

I'm just starting to learn Python and am starting by creating a text
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):
        name = raw_input('What is your name')
        os = raw_input('What is your os')
        self.name = name
        self.os = os

Skills(name,os)

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?

Thank you in advance



More information about the Tutor mailing list