Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- side = [float(i) for i in input().split()] # сторона квадрата основания
- height = [float(i) for i in input().split()] # высота пирамиды
- volume_pyr = [(float(side[i])**2 * float(height[i]))/3 for i in range(len(side))] # список объёмов пирамид
- pyr_sq = [2*side[i] * math.sqrt(0.25 * side[i]**2 + height[i]**2) for i in range(len(side))] # площадь поверхности пирамиды
- # Выведем на экран нужные значения
- print("Vmax: %2d, %8.2f, Smin: %2d, %8.2f" % (volume_pyr.index(max(volume_pyr)), max(volume_pyr), pyr_sq.index(min(pyr_sq)), min(pyr_sq)))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement