Advertisement
Gowwa

Untitled

Jul 16th, 2019
1,108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. def P():
  2.     f = int(input("Основание 1: "))
  3.     g = int(input("Основание 2: "))
  4.     h = int(input("Высота: "))
  5.     P = f + g + 2 * (h ** 2+(f-g) ** 2 / 4) ** 0.5
  6.     print("Периметр равнобедренной трапеции равен ", int(P))
  7.     return P
  8.  
  9. P1 = P()
  10. P2 = P()
  11. Sum = P1 + P2
  12. print("Сумма периметров двух трапеций равна", int(Sum))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement