-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday1.py
More file actions
122 lines (92 loc) · 1.45 KB
/
Copy pathday1.py
File metadata and controls
122 lines (92 loc) · 1.45 KB
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
"""print("Hi")
a=20
b = 40
a,b = 30,40
a = b = 10
print(a)"""
"""a = 10
b = 20
c = a
a = b
b = c
print(a)
print(b)
"""
"""a = 10
b = 20
a = a + b
a = a - b
b = a - b
print(a)
print(b)"""
"""a= 10
if a%2 == 0:
print("even")
else:
print("odd")"""
"""mark = 50
if mark > 90:
prin("A")
elif mark > 80:
print("B")
elif mark > 70:
print(60)
elif mark > 50:
print("D")
elif mark > 40:
print("E")
else:
print("Fail")"""
#create a grade system
#90-100 A
#80-89 B
#70-79 D
#0-59 F
"""mark = 50
if mark > 90:
prin("A")
elif mark > 80:
print("B")
elif mark > 70:
print(60)
elif mark > 50:
print("D")
elif mark > 40:
print("E")
else:
print("Fail")"""
#check a number is positive or negative or zero
"""num = 100
if num > 0:
print("Positive")
elif num < 0:
print("Negative")
else:
print("Zero")"""
#check a number is even or odd
"""num = 0
if num % 2 == 0:
print("Even")
else:
print("Odd")"""
#check a number is divisible by 3 or not
"""num = 99
if num % 3 == 0:
print("Divisible by 3")
else:
print("Not divisible by 3")"""
#and operator
""" true and true = true
true and false = false
false and true = false
false and false = false"""
#or operator
""" true and true = true
true and false = false
false and true = false
false and false = false"""
#not operator
"""not true = false
not false = true"""
string1 = '0123456789'
print(string1[-1:-10:-1])