Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- '''
- Created on 17/05/2010
- @author: victor
- '''
- from turtle import *
- class Ventana(Turtle):
- '''
- classdocs
- '''
- def __init__(self, ventana):
- '''
- Constructor
- '''
- ventana = reset()
- def pelota(self):
- self.hideturtle()
- self.color("green")
- self.begin_fill()
- self.circle(10,360)
- self.end_fill()
- def rojo(self):
- self.lapiz_rojo = Turtle.Pen()
- self.lapiz_rojo.begin_fill()
- self.lapiz_rojo.begin_poly()
- for x in range(4):
- self.lapiz_rojo.fd(20)
- self.lapiz_rojo.left(90)
- self.lapiz_rojo.fd(40)
- self.lapiz_rojo.left(90)
- self.lapiz_rojo.end_fill()
- self.lapiz_rojo.end_poly()
- def main(self):
- self.__init__()
- Ventana.ventana(self)
- Ventana.pelota(self)
- Ventana.rojo(self)
- return True
- if __name__=="__main__":
- window=Ventana(Turtle)
- mainloop()
- pass
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement