-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathConditions.py
More file actions
31 lines (31 loc) · 900 Bytes
/
Conditions.py
File metadata and controls
31 lines (31 loc) · 900 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
temp = 30
if temp > 35:
print("الجو حر")
elif temp > 25:
print("الجو دافي")
else:
print("الجو بارد")
#-----------------------------------------------
x = 10
result = "Even" if x % 2 == 0 else "Odd"
print(result)
#------------------OR---------------------------
print("Even") if x % 2 == 0 else print("Odd")
#-----------------------------------------------
score = 84
grade = "A" if score >= 85 else "B" if score >= 75 else "C"
print(grade)
#-----------------------------------------------
a = 10
b = 20
if a == 10 and b == 20 : print(True)
if all([a == 10, b==20, x == 10, result.lower() == "even" ]) :
print(True)
#------------------------------------------------
language = "Python"
match language :
case "Python":
print("You choose python")
case _:
print("You don't choose python")
#------------------------------------------------