Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #! /usr/bin/env python3
- # Решение №1
- def calcBmi1(l): return (list(map((lambda y : y[0] / y[1] ** 2), l)))
- # Решение №2
- def calcBmi2(l): return [y[0] / y[1] ** 2 for y in l]
- # Решение №3
- o = list()
- def calcBmi3(l):
- for i in l:
- o.append(i[0] / i[1] ** 2)
- return o
- # print(calcBmi([(70, 1.7), (80, 1.8), (90, 1.9)]))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement