#!/usr/bin/python # coding: utf-8 # OOP-Beispielskript 3 class Lamp: def __init__(self, wattzahl = 40, name = "Standardlampe"): self.wattzahl = wattzahl self.name = name def zeigeWattzahl(self): print "'" + self.name + "' hat eine Birne mit " + str(self.wattzahl) + " Watt." lamp = Lamp(wattzahl = 11) lamp.zeigeWattzahl()