Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- def perimetr(h, a, b):
- x = ((abs(a - b) / 2)**2 + h**2)**0.5
- per = a + b + x + x
- return(per)
- h = int(input('Введите высоту: '))
- a = int(input('Введите первое основание: '))
- b = int(input('Введите второе основание: '))
- per_1 = perimetr(h, a, b)
- h = int(input('Введите высоту: '))
- a = int(input('Введите первое основание: '))
- b = int(input('Введите второе основание: '))
- per_2 = perimetr(h, a, b)
- print('Сумма периметров двух трапеций равна: ', per_1 + per_2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement