Example #1
0
def main():
    r = Rectangle(3, 2, "blue")
    c = Circle(5, "green")
    s = Square(5, "red")
    print(r.repr())
    print(c.repr())
    print(s.repr())
Example #2
0
def main():
    r = Rectangle("синего", 7, 4)
    c = Circle("зелёного", 9)
    s = Square("красного", 2)
    print(r)
    print(c)
    print(s)

    a = np.array([r.square(), c.square(), s.square()], float)
    for f in a:
        print(f)
Example #3
0
File: main.py Project: S4ll7/RIP
def main():
    rectangle = Rectangle(3, 2, "black")
    circle = Circle(5, "green")
    square = Square(5, "red")
    print(rectangle)
    print(circle)
    print(square)
Example #4
0
def main():
    print("Версия библиотеки requests из виртуального окружения: " +
          requests.__version__ + "\n")

    rect = Rectangle(18, 18, "Red")
    sqd = Squad(18, "Purple")
    circ = Circle(18, "Green")

    rect.about()
    sqd.about()
    circ.about()

    print("\n\033[33mИспользуя метод \033[35m__repr__\033[0m:")
    print(rect)
    print(sqd)
    print(circ)
Example #5
0
File: main.py Project: Srgusev/Rip
def main():
    rectangle1 = Rectangle(16, 9, "blue")
    circle1 = Circle(5, "green")
    square1 = Square(4, "red")
    print(rectangle1)
    print(circle1)
    print(square1)
Example #6
0
def main():
    r = Rectangle(11, 11, "синего")
    c = Circle("зеленого", 11)
    s = Square("красного", 11)
    print(r)
    print(c)
    print(s)
Example #7
0
def main():
    rectangle = Rectangle(1, 1, "синий")
    print(Fore.BLUE + str(rectangle))
    circle = Circle(1, "зелёный")
    print(Fore.GREEN + str(circle))
    square = Square(1, "красный")
    print(Fore.RED + str(square))
Example #8
0
def main():
    r = Rectangle("синего", 3, 2)
    c = Circle("зеленого", 5)
    s = Square("красного", 5)
    print(r)
    print(c)
    print(s)
Example #9
0
def main():
    number = 22
    example_rectangle = Rectangle("красного", number, number - 1)
    example_square = Square("белого", number)
    example_circle = Circle("черного", number)
    print(example_rectangle)
    print(example_square)
    print(example_circle)
Example #10
0
def main():
    r = Rectangle("синего", 16, 16)
    c = Circle("зеленого", 16)
    s = Square("красного", 16)
    print(r)
    print(c)
    print(s)
    print(numpy.zeros((3, 3)))
Example #11
0
def main():
    r = Rectangle(3, 2, 'красного')
    s = Square(5, 'синего')
    c = Circle(5, 'фиолетового')

    print(r)
    print(s)
    print(c)
Example #12
0
def main():
    rectangle = Rectangle(3, 2, 'grey')
    circle = Circle(5, 'green')
    square = Square(5, 'red')

    print(rectangle)
    print(circle)
    print(square)
Example #13
0
def main():
    print(arrow.now(), "\n")
    r = Rectangle("синего", 14, 14)
    c = Circle("зеленого", 14)
    s = Square("красного", 14)
    print(r)
    print(c)
    print(s)
Example #14
0
def main():
    print("Торжков Максим ИУ5-51Б")
    print(arrow.now().format('YYYY-MM-DD HH:mm:ss'))
    r = Rectangle("синего", 19, 19)
    c = Circle("зеленого", 19)
    s = Square("красного", 19)
    print(r)
    print(c)
    print(s)
Example #15
0
def main():
    rect = Rectangle("синего", 10, 10)
    circ = Circle("зеленого", 10)
    squar = Square("красного", 10)
    print(rect)
    print(circ)
    print(squar)
    a = np.array([20, 30, 40, 50])
    b = np.arange(4)
    print(a + b)
Example #16
0
def main():
    r = Rectangle("синего", 5, 6)
    c = Circle("красного", 11)
    s = Square("желтого", 11)

    utc_time = arrow.utcnow()
    print('Времечко у нас такое вот (UTC): ', utc_time)
    print(r)
    print(c)
    print(s)
Example #17
0
File: main.py Project: Ollegik/RIP
def main():
    r = Rectangle("красного", 1, 2)
    c = Circle("зеленого", 3)
    s = Square("жёлтого", 4)
    table = PrettyTable()
    table.field_names = ['Таблица фигур']
    table.add_row([r])
    table.add_row([c])
    table.add_row([s])
    print(table)
Example #18
0
def main():
    print("ИУ5-51Б Забелина Варвара Лаб2")
    r = Rectangle("синего", 10, 10)
    c = Circle("зеленого", 10)
    s = Square("красного", 10)
    print(r)
    print(c)
    print(s)

    plt.plot((3, 1, 2, 3, 4, 5, 3), (0, 2, 3, 2, 3, 2, 0))
    plt.show()
Example #19
0
File: main.py Project: Yury132/RIP
def main():
    my_rectangle = Rectangle(20, 20, "синего")
    my_circle = Circle(20, "зеленого")
    my_square = Square(20, "красного")

    print(my_rectangle)
    print(my_circle)
    print(my_square)

    my_array = numpy.array([[1, 2, 3], [4, 5, 6]], float)
    print("Метод внешнего пакета NumPy (shape) ", my_array.size)
Example #20
0
from lab_python_oop.rectangle import Rectangle
from lab_python_oop.circle import Circle
from lab_python_oop.quadrate import Quadrate
import numpy as np

if __name__ == '__main__':
    print("Забурунов Леонид Вячеславович, группа РТ5-51Б. Лабработа #2")
    print(
        "Программа проверяет функционал созданных по заданию лабораторной работы модулей."
    )
    print(
        "Вам будет предложено ввести данные для прямоугольника, круга и квадрата. Ввод для каждого объекта осуществляется в одну строку, через пробел."
    )
    print("Введите данные прямоугольника: ")
    rctg = Rectangle(input().split())
    print("Введите данные круга: ")
    crc = Circle(input().split())
    print("Введите данные квадрата: ")
    qdr = Quadrate(input().split())
    print('Итоги ввода: ', rctg, crc, qdr, sep='3\n')
    print('\n', np.ones((3, 20), float))
Example #21
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__":
    rectangle = Rectangle(3, 2, "синий")
    circle = Circle(5, "зеленый")
    square = Square(5, "красный")
    print(rectangle)
    print(circle)
    print(square)
Example #22
0
File: main.py Project: volk401/RIP
from lab_python_oop.circle import Circle
from lab_python_oop.rectangle import Rectangle
from lab_python_oop.square import Square
from numpy import euler_gamma

if (__name__ == "__main__"):
    rectangle = Rectangle(3, 3, "синего")
    circle = Circle(3, "зелёного")
    square = Square(3, "красного")

    print(rectangle)
    print(square)
    print(circle)
    print("Euler gamma constant y = {}".format(euler_gamma))
Example #23
0
# coding=utf-8
# This is a sample Python script.

# Press ⌃R to execute it or replace it with your code.
# Press Double ⇧ to search everywhere for classes, files, tool windows, actions, and settings.

from lab_python_oop.rectangle import Rectangle
from lab_python_oop.circle import Circle
from lab_python_oop.square import Square

if __name__ == "__main__":
    r = Rectangle("синего", 6, 12)
    c = Circle("зеленого", 6)
    s = Square("красного", 6)
    print(r.__repr__())
    print(c.__repr__())
    print(s.__repr__())
Example #24
0
from lab_python_oop.circle import Circle
from lab_python_oop.square import Square
from lab_python_oop.rectangle import Rectangle

rectangle, crcl, sqr = Rectangle(10, 22, "orange"), Circle(36,
                                                           "yellow"), Square(
                                                               4, "black")

print(rectangle, crcl, sqr, sep="\n")
Example #25
0
File: main.py Project: Turic1/RIP2
from lab_python_oop.rectangle import Rectangle
from lab_python_oop.circle import Circle
from lab_python_oop.square import Square

if __name__ == "__main__":
    print(Rectangle(3, 2, "Синий"))
    print(Circle(5, "Зеленый"))
    print(Square(5, "Красный"))