Skip to content

Commit 6966602

Browse files
committed
add justlearning
1 parent 5f663fa commit 6966602

2 files changed

Lines changed: 57 additions & 0 deletions

File tree

justlearning/ListTuple.py

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Operator (oprator)
2+
3+
a = 2
4+
b = 4
5+
6+
# Oprator +
7+
8+
hasiltambah = a + b
9+
print(hasiltambah)
10+
11+
# Oprator -
12+
13+
hasilkurang = a - b
14+
print(hasilkurang)
15+
16+
# Oprator *
17+
18+
hasilperkalian = a * b
19+
print(hasilperkalian)
20+
21+
# Oprator **
22+
23+
hasilpangkat = a ** b
24+
print(hasilpangkat)
25+
26+
# Oprator /
27+
28+
hasilpembagian = a / b
29+
print(hasilpembagian)
30+
31+
# Oprator // (div)
32+
33+
hasildiv = a // b
34+
print(hasildiv)
35+
36+
# Oprator % (Mod)
37+
38+
hasilmod = a % b
39+
print(hasilmod)

justlearning/Listtuple_part2.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# LIST
2+
3+
##L1 = [62,13,73,13,235,1231,1,24,6]
4+
####L1.insert(3,60)
5+
####L2 = [7,8,9,10]
6+
####L1.extend(L2)
7+
####L.append(7)
8+
####L.append('Poncoe')
9+
####L1.reverse()
10+
##L1.sort()
11+
##print(L1)
12+
13+
# TUPLE
14+
15+
TA = (1,2,3,4,5,6)
16+
TB = ('a','b','c')
17+
TC = TA + TB
18+
print(TC)

0 commit comments

Comments
 (0)