Advertisement
fevzi02

ПЗ - 2. Задание 8.

Oct 25th, 2021
798
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class Circle:
  2.     def __init__(self, r):
  3.         self.r = r
  4.         self.pi = 3.14
  5.     def circumference(self):     #Длина окружности
  6.         return 2 * self.pi * self.r
  7.     def area_circle(self):       #Площадь круга
  8.         return self.pi * self.r ** 2
  9.  
  10. c1 = Circle(6)
  11. print(c1.circumference())
  12. print(c1.area_circle())
  13.  
Advertisement
Advertisement
Advertisement
RAW Paste Data Copied
Advertisement