Q:

Defining classes with default values

I understand that when I define a class I need to include self and init, but could someone help me with how I could define a class with a default value?
For instance:
class Student1():
    def __init__(self, college='University', gpa=3.2, credits=45):
        ...

class Student2():
    def __init__(self, college='Community College', gpa=3.8, credits=51):
        ...

I want to be able to have Student1.college to have the global value of 'University', Student2.college to have the global value of 'Community College', Student2.gpa to have the global value of 3.8 and Student1.gpa to have the global value of 3.2 so that when I use them in code later on they have the values I gave them.
Thanks in advance!
EDIT::
class Student():
    def __init__(self, college, gpa, credits)
        self.college=college
        self.gpa=gpa
        self.credits=credits
Student1=Student("university", 3.2, 45)
Student2=Student("community college", 3.8, 51)
    def work(self, job='work study')
        self.job=job 

So when I type Student1.college in the Python Shell it would return "university".
I want it so that both Student 1 and Student 2 have the "job" work study but when I type self.job in the Shell it says "Name:Error name "self" is not defined" Why? 

A:

There are a few small issues with your code. First you need to finish defining you class before you create student1 and student2. In python when you de-indent, you're telling the interpreter that you've reached the end of a block (ie a function, a class, a loop, or some other code block). If you want work to be a method of your class, it needs to be part of the class block for Student.
Second, afaict, you only ever set the job attribute in work but you never call work. It's often a good idea, but not required, to set every attribute to some default value in init.
And third, it seems like you're missing some : and have at least one indentation error. Try something like this:
class Student():
    def __init__(self, college, gpa, credits):
        self.college = college
        self.gpa = gpa
        self.credits = credits
        self.job = "no job"

    def setWork(self, job='work study'):
        self.job = job

student1 = Student("university", 3.2, 45)
student1.setWork()
student2 = Student("community college", 3.8, 51)
student2.setWork("Starbucks")

print student1.job
# work study
print student2.job
# Starbucks

