obrazky
-

Opakovanie

  1. Create a class Circle with two methods area and perimeter.
  2. Write a Python program to create a class Person. Include attributes like name, country and date of birth. Implement a method to determine the person’s age.
  3. Pomocou cyklu vytvorte nasledujúci obrázok

elipsy

  1. Write a class Tree with three parameters: height, x, y.

The class will have a method to draw a tree composed of height number of triangles, where the smallest one has dimensions 10×10, and each subsequent triangle is 20 units wider, i.e. 30×10, 50×10, …

The parameters x and y specify the center of the smallest rectangle.

When drawing the triangle, use the command

    canvas.create_polygon(x1, y1, x2, y2, x3, y3, fill=color)
-
Copyright © 2008-2026 Miroslava Valíková