Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #H/W
- #1
- #Женя, Вася
- D = {'Женя': 89, 'Вася': 100, 'Марк': 71, 'Мария': 79}
- f = list(filter(lambda x: D[x] > 80, D))
- print(f)
- #2
- L = map(int, input().split())
- f = list(map(lambda x: x**3, L))
- print(f)
- #[8, 64, 216, 512, 1000]
- #3
- L = map(int, input().split())
- f = list(filter(lambda x: x < 0, L))
- print(f)
- #[-1, -7, -8, -10]
- #4
- from functools import reduce
- L1 = [1, 2, 3, 4, 5, 6, 7, 8]
- f = reduce(lambda x, y: x * y, L1)
- print(f)
- #40320
- #5
- L1 = map(int, input().split())
- # L2 = (i**2 for i in L1)
- f = filter(lambda x: ((x ** 2) % 9) == 0, L1)
- g = max(f)
- print((g))
- #6
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement