Пример #1
0
def main():
    r = Rectangle("синий", 3, 2)
    c = Circle("зеленый", 5)
    s = Square("красный", 5)
    print(r)
    print(c)
    print(s)
Пример #2
0
def main():
    rectangle = Rectangle(3, 2, "blue")
    circle = Circle(5, "green")
    square = Square(5, "red")
    print(rectangle)
    print(circle)
    print(square)
Пример #3
0
def main():
    r = Rectangle("Синего", 3, 2)
    c = Circle("Красного", 5)
    s = Square("Желтого", 5)
    print(r)
    print(c)
    print(s)
Пример #4
0
def main():

    rectangle = Rectangle("синего", 2, 2)
    circle = Circle("зеленого", 5)
    square = Square("красного", 2)

    print(rectangle)
    print(circle)
    print(square)
Пример #5
0
def main():
    print(Fore.GREEN + 'Павловская А.А. ИУ5-51Б')
    print(Style.RESET_ALL)
    figure1 = Rectangle("синего", 15, 15)
    figure2 = Circle("зеленого", 15)
    figure3 = Square("красного", 15)
    print(figure1)
    print(figure2)
    print(figure3)
Пример #6
0
Файл: main.py Проект: Ilyagu/RIP
def main():
    r = Rectangle(12, 12, "синего")
    c = Circle(12, "зелёного")
    s = Square(12, "красного")
    print(Back.BLUE)
    print(r)
    print(Back.GREEN)
    print(c)
    print(Back.RED)
    print(s)
Пример #7
0
def main():
    print("ИУ5-51Б Пахомкин Кирсан Лаб №2")
    #print(arrow.now(), "\n")

    rectangle = Rectangle("синего", 16, 16)
    circle = Circle("зеленого", 16)
    square = Square("красного", 16)

    print(rectangle)
    print(circle)
    print(square)
Пример #8
0
def main():
    print("Выполнил: Дюжев Степан Андреевич ИУ5Ц-73Б")
    rect = Rectangle(73, 73, "blue")
    circle = Circle(73, "green")
    square = Square(73, "red")

    print(rect)
    print(circle)
    print(square)

    pprint.pprint(get_location_info())
Пример #9
0
def main():
    print("ИУ5-51Б Андреев Александр Владимирович Лаб №2")
    #print(arrow.now(), "\n")

    rectangle = Rectangle("синего", 16, 16)
    circle = Circle("зеленого", 16)
    square = Square("красного", 16)

    print(rectangle)
    print(circle)
    print(square)
Пример #10
0
def main():

    print("\nДубянский Антон Игоревич, ИУ5Ц-71Б, Лаб №2\n")

    rectangle = Rectangle("синего", 2, 2)
    circle = Circle("зеленого", 2)
    square = Square("красного", 2)

    print(rectangle)
    print(circle)
    print(square)
Пример #11
0
from lab_python_oop.Rectangle import Rect
from lab_python_oop.Squar import Squar
from lab_python_oop.Circle import Circle

if __name__ == "__main__":
    myrect = Rect(2,3, "Blue")
    mysquere = Squar(5, "Red")
    mycircle = Circle(5, "Green")

    print(myrect.repr())
    print(mysquere.repr())
    print(mycircle.repr())
Пример #12
0
from lab_python_oop.Rectangle import Rectangle
from lab_python_oop.Circle import Circle
from lab_python_oop.Square import Square

if __name__ == "__main__":
    rect = Rectangle(3, 2, "синий")
    rect.repr()

    circle = Circle(5, "зеленый")
    circle.repr()

    square = Square(5, "красный")
    square.repr()

Пример #13
0
import lab_python_oop.Exceptions as e
from lab_python_oop.Rectangle import Rectangle
from lab_python_oop.Circle import Circle
from lab_python_oop.Square import Square

# Wow. It's raises exception :)
try:
    r = Rectangle(1, 1, 'unreal_color')
    print(r)
except e.LabException as err:
    print('Expected exception:', err)
    print()

r = Rectangle(3, 2, 'blue')
print(r)

c = Circle(5, 'green')
print(c)

s = Square(5, 'red')
print(s)

# How do you like that, Elon Musk?
s.width = 10
# Spoiler: everything is ok.
# Because I overloaded the properties
print(s)
Пример #14
0
def main():
    r, c, s = Rectangle(21, 21,
                        'синий'), Circle(21, 'зеленый'), Square(21, 'красный')
    print(r, c, s, sep='\n')
Пример #15
0
from lab_python_oop.Rectangle import Rect
from lab_python_oop.Square import Square
from lab_python_oop.Circle import Circle

c = Circle(3, 'зеленый')
s = Square(2, 'красный')
v = Rect(5, 4, 'Коричневый')

print(c)
print(s)
print(v)
Пример #16
0
from lab_python_oop.Rectangle import Rectangle
from lab_python_oop.Square import Square
from lab_python_oop.Circle import Circle
if __name__ == "__main__":
    r1 = Rectangle(3, 2, "Синий")
    print(r1)
    s1 = Square(5, "Красный")
    print(s1)
    c1 = Circle(5, "Зелёный")
    print(c1)