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

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

    print(rectangle)
    print(circle)
    print(square)
Example #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)
Example #6
0
File: main.py Project: 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)
Example #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)
Example #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())
Example #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)
Example #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)
Example #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())
Example #12
0
File: main.py Project: vikks15/IAD
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()

Example #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)
Example #14
0
def main():
    r, c, s = Rectangle(21, 21,
                        'синий'), Circle(21, 'зеленый'), Square(21, 'красный')
    print(r, c, s, sep='\n')
Example #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)
Example #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)