Q:

What is going wrong? Nothing is printing in Python

My assignment is in Python 3.3.2 and it is here:
Create a class for a dice object that can randomly generate a number between 1 and 6 and save the file. 
You will need the random module and 
Create 2 Dice objects a and b and add their values together. 
Here are the rules
Win = total equals 7 or 11
Lose = total equals 2,3 or 12
Roll again = total equals 5,6,8,9,10 until a 7 is rolled or the same number is thrown again.

Now the code I have written:
import random

class Dice:
    '''A class that makes Dice'''

    number = random.randint(1,6)

a = Dice
b = Dice

result = a.number + b.number

def resultgiver():
    if result == '7':
        result == '11'
        print('You won! You got ' ,result,'.')

    elif result == '2':
        result == '3'
        result == '12'
        print('You lost! You got ' ,result,'.')

    elif result == '5':
        result == '6'
        result == '8'
        result == '9'
        result == '10'
        print('Roll again! You got ' ,result,'.')

    elif result == '5':
        result == '6'
        result == '8'
        result == '9'
        result == '10'

    elif result == '7':
        result == '11'

resultgiver()

A:

Couple of problems:

you need parentheses around your class instances:

a = Dice() and
b = Dice()

result is an integer yet all your if statments check if it equals a char. remove all the quotes around your the numbers
if result == 5:
you need an init in your class so you always get a different number when you instantiate the class.
class Dice:
        '''A class that makes Dice'''
    def __init__(self):
        self.number = random.randint(1,6)

try putting a else at the end to catch any result that is not 7 or 5:
elif result == '7':
        result == '11'
else:
    print "we got here"

I think you are trying to emulate a switch statement with your if statement. The way you did wont work but try this:
def resultgiver():
    if result in [7,11]:
        print('You won! You got ' ,result,'.')

    elif result in [2, 3, 12]:
        print('You lost! You got ' ,result,'.')

    elif result in [5, 6, 8, 9, 10]:
        print('Roll again! You got ' ,result,'.')

    else:
        print "default case for result =", result

