本文整理汇总了Python中Figuras.Figuras.circulo方法的典型用法代码示例。如果您正苦于以下问题:Python Figuras.circulo方法的具体用法?Python Figuras.circulo怎么用?Python Figuras.circulo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Figuras.Figuras
的用法示例。
在下文中一共展示了Figuras.circulo方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: TestCase
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
class TestCase(unittest.TestCase):
def setUp(self):
self.cal = Figuras()
def test_usuario0(self):
self.assertEqual(4, self.cal.cuadrado(2))
def test_usuario01(self):
self.assertEqual(
18.847850000000005, self.cal.circulo(2.45))
def test_usuario1(self):
self.assertEqual(2, self.cal.rectangulo(2, 1))
def test_usuario2(self):
self.assertEqual(5, self.cal.triangulo(2, 5))
def test_usuario3(self):
self.assertEqual(8, self.cal.rombo(2, 8))
def test_usuario4(self):
self.assertEqual(25, self.cal.cuadrado(5))
def test_usuario5(self):
self.assertEqual(12.56, self.cal.circulo(2))
def test_usuario6(self):
self.assertEqual(14, self.cal.rectangulo(2, 7))
def test_usuario7(self):
self.assertEqual(3, self.cal.triangulo(2, 3))
def test_usuario8(self):
self.assertEqual(8, self.cal.rombo(2, 8))
def test_usuario9(self):
self.assertEqual(4, self.cal.cuadrado(2))
def test_usuario10(self):
self.assertEqual(113.04, self.cal.circulo(6))
def test_usuario11(self):
self.assertEqual(4, self.cal.rectangulo(2, 2))
def test_usuario12(self):
self.assertEqual(8, self.cal.triangulo(2, 8))
def test_usuario13(self):
self.assertEqual(4, self.cal.rombo(2, 4))
示例2: when_i_compute_its_figure
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def when_i_compute_its_figure(step):
f=Figuras()
if(world.escenario==0):
world.number = f.cuadrado(world.number)
elif(world.escenario==1):
world.number = f.circulo(world.number)
elif(world.escenario==2):
world.number = f.rombo(world.number,world.base)
elif(world.escenario==3):
world.number = f.triangulo(world.number,world.base)
else:
world.number = f.rectangulo(world.number,world.base)
示例3: test_area_circulo
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def test_area_circulo(self):
fig=Figuras()
self.assertEqual(12.5664,fig.circulo(2))
示例4: test_area_circulo4
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def test_area_circulo4(self):
fig=Figuras()
self.assertEqual(50.2656,fig.circulo(4))
示例5: test_area_circulo3
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def test_area_circulo3(self):
fig=Figuras()
self.assertEqual(28.2744,fig.circulo(3))
示例6: test_circulo_1
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def test_circulo_1(self):
fig = Figuras()
self.assertEqual(3.1416,fig.circulo(1))
示例7: test_circulo_5
# 需要导入模块: from Figuras import Figuras [as 别名]
# 或者: from Figuras.Figuras import circulo [as 别名]
def test_circulo_5(self):
fig = Figuras()
self.assertEqual(78.53999999999999,fig.circulo(5))