def main(): r = Rectangle(3, 2, "blue") c = Circle(5, "green") s = Square(5, "red") print(r.repr()) print(c.repr()) print(s.repr())
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)
def main(): rectangle = Rectangle(3, 2, "black") circle = Circle(5, "green") square = Square(5, "red") print(rectangle) print(circle) print(square)
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)
def main(): rectangle1 = Rectangle(16, 9, "blue") circle1 = Circle(5, "green") square1 = Square(4, "red") print(rectangle1) print(circle1) print(square1)
def main(): r = Rectangle(11, 11, "синего") c = Circle("зеленого", 11) s = Square("красного", 11) print(r) print(c) print(s)
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))
def main(): r = Rectangle("синего", 3, 2) c = Circle("зеленого", 5) s = Square("красного", 5) print(r) print(c) print(s)
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)
def main(): r = Rectangle("синего", 16, 16) c = Circle("зеленого", 16) s = Square("красного", 16) print(r) print(c) print(s) print(numpy.zeros((3, 3)))
def main(): r = Rectangle(3, 2, 'красного') s = Square(5, 'синего') c = Circle(5, 'фиолетового') print(r) print(s) print(c)
def main(): rectangle = Rectangle(3, 2, 'grey') circle = Circle(5, 'green') square = Square(5, 'red') print(rectangle) print(circle) print(square)
def main(): print(arrow.now(), "\n") r = Rectangle("синего", 14, 14) c = Circle("зеленого", 14) s = Square("красного", 14) print(r) print(c) print(s)
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)
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)
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)
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)
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()
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)
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))
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)
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))
# 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__())
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")
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, "Красный"))