-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclass9.py
More file actions
39 lines (35 loc) · 873 Bytes
/
class9.py
File metadata and controls
39 lines (35 loc) · 873 Bytes
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
# List Questions
# Access the 3rd element in the list my_list = [10, 20, 30, 40, 50]?
# Add the value 60 to the end of the list my_list = [10, 20, 30, 40, 50].
# Remove the value 20 from the list my_list = [10, 20, 30, 40, 50].
# Replace the value at index 2 in the list my_list = [10, 20, 30, 40, 50] with 35.
# my_list = [10, 20, 30, 40, 50]
# print(my_list[2])
# my_list.append(60)
# # my_list.pop()
# my_list.remove(20)
# my_list[2] = 35
# print(5>0)
# x = 78
# if x>=90: #True
# print("A+")
# elif x>=80: #Else if
# print("A-")
# elif x>=70: #Else if
# print("A")
# elif x>= 60: #Else if
# print("B+")
# elif x>= 50: #Else if
# print("B-")
# elif x>=40: #Else if
# print("B")
# else:
# print("Fail")
# num = 13
# if num%2 == 0:
# print("Even")
# else:
# if num%3 == 0:
# print(num)
# print("odd")
# print("Done")