-
Notifications
You must be signed in to change notification settings - Fork 0
/
Task5.py
91 lines (39 loc) · 990 Bytes
/
Task5.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# TASK5 HOMEWORK -----> ATABEK
# 1)
# a = {1, 6, 4, 0, 34, 17, 100, -45}
# b = {22, 0, 3, 100, 4}
# c = a & b
# d = a - b
# g = a | b
# print(c)
# print(d)
# print(g)
# 2)
# Aybek = {'Daho', 'ImperiaPizza', 'Freshbox'}
# Aidai = {'OchakKebab', 'Freshbox'}
# Azat = {'Freshbox', 'KFC'}
# Gulzana = {'Daho', 'ImperiaPizza', 'Freshbox', 'KFC', 'OchakKebab'}
# a = Aybek & Aidai & Azat & Gulzana
# print(a)
# 3)
# Djohn = {5, 7, 11, 10, 28}
# Raychel = {29, 2, 6, 12, 3}
# Catren = {1, 5, 14, 8, 22}
# Sam = {19, 20, 3, 11, 10}
# if Djohn & Raychel:
# print(Raychel)
# if Djohn & Catren:
# print(Catren)
# if Djohn & Sam:
# print(Sam)
# 4)
#
# 1)
# Ingredients = {'Cheese', 'mushrooms', 'sous', 'shpinat'}
# Ingredients.add('pomidor')
# Ingredients.discard('Kolbasa')
# Ingredients.remove('shpinat')
# if 'Cheese' in Ingredients:
# Ingredients.remove('Cheese')
# Ingredients.add('Cheese Motserella')
# print(Ingredients)