-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoperator.py
More file actions
54 lines (36 loc) · 749 Bytes
/
Copy pathoperator.py
File metadata and controls
54 lines (36 loc) · 749 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# AirthMethic Operators
print(10+10)
sum1 = 100+ 100
print(sum1)
x = 5
y = 3
print(x - y)
print(x*y)
print(x/y)
print(x%y)
print(x**y) # Expontation Square
print(x//y) # Floor Divison
numbers = [1, 2, 3, 4, 5]
if (count := len(numbers)) > 3:
print(f"List has {count} elements")
num = 6
x = "WEEKEND!" if num > 5 else "Workday"
print(x)
num = 6
x = "Fri" if num == 5 else "Sat" if num == 6 else "Sun" if num == 7 else "weekday"
print(x)
x = 5
y = 3
print(x == y)
print(x != y)
print(x > y)
print(x < y)
print(x >= y)
print(x <= y)
x = ["apple", "banana"]
y = ["apple", "banana"]
z = x
fruits = ["apple", "banana", "cherry"]
print("banana" in fruits)
fruits = ["apple", "banana", "cherry"]
print("pineapple" not in fruits)