Advertisement
Guest User

Glista

a guest
Oct 9th, 2015
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.47 KB | None | 0 0
  1. from turtle import *
  2.  
  3. class glista:
  4.     def __init__(self, n_kol=0, d=0, naziv='', boja='red'):
  5.         self.n=n_kol
  6.         self.d=d
  7.         self.naziv=naziv
  8.         self.boja=boja
  9.     def crtanje(self):
  10.         pencolor(self.boja)
  11.         fillcolor(self.boja)
  12.         for i in range(0,self.n):
  13.             begin_fill()
  14.             circle(40)
  15.             end_fill()
  16.             pu()
  17.             fd((self.d/self.n))
  18.             pd()
  19.         pu()
  20.         home()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement