forked from MojahiMotaung/python_dataTypes_test
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathintermediate_test.py
141 lines (104 loc) · 2.4 KB
/
intermediate_test.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
def add_to_list(numbers):
"""
Task:
- Add the number 6 to the given list `numbers`.
Return:
- The modified list.
"""
pass
def remove_from_list(numbers):
"""
Task:
- Remove the number 3 from the given list `numbers`.
Return:
- The modified list.
"""
pass
def insert_at_beginning(numbers):
"""
Task:
- Insert the number 0 at the beginning of the given list `numbers`.
Return:
- The modified list.
"""
pass
def reverse_list(numbers):
"""
Task:
- Reverse the order of elements in the list `numbers`.
Return:
- The reversed list.
"""
pass
def create_new_tuple(t):
"""
Task:
- Create a new tuple that contains the first two elements of the tuple `t`.
Return:
- The new tuple with the first two elements.
"""
pass
def check_if_value_exists(t, value):
"""
Task:
- Check if the value 15 exists in the tuple `t`.
Return:
- True if the value exists, otherwise False.
"""
pass
def find_intersection(set1, set2):
"""
Task:
- Find the intersection of sets `set1` and `set2`.
Return:
- The intersection of the two sets.
"""
pass
def find_union(set1, set2):
"""
Task:
- Find the union of sets `set1` and `set2`.
Return:
- The union of the two sets.
"""
pass
def find_difference(set1, set2):
"""
Task:
- Find the difference between set1 and set2 (i.e., set1 - set2).
Return:
- The difference between the two sets.
"""
pass
def add_student(student_grades):
"""
Task:
- Add a new student 'David' with a grade of 92 to the dictionary `student_grades`.
Return:
- The updated dictionary with the new student.
"""
pass
def change_bob_grade(student_grades):
"""
Task:
- Change Bob’s grade to 95 in the dictionary `student_grades`.
Return:
- The updated dictionary with Bob’s grade changed.
"""
pass
def delete_charlie(student_grades):
"""
Task:
- Delete 'Charlie' from the dictionary `student_grades`.
Return:
- The updated dictionary with Charlie removed.
"""
pass
def retrieve_alice_grade(student_grades):
"""
Task:
- Retrieve the grade of Alice from the dictionary `student_grades`.
Return:
- Alice's grade.
"""
pass