diff --git a/bab1_input_output/Latihan 4.py b/bab1_input_output/latihan4.py similarity index 100% rename from bab1_input_output/Latihan 4.py rename to bab1_input_output/latihan4.py diff --git a/bab2_if-else/screenshoot/menentukan_sim.png b/bab2_if-else/screenshoot/menentukan_sim.png deleted file mode 100644 index 14365f3..0000000 Binary files a/bab2_if-else/screenshoot/menentukan_sim.png and /dev/null differ diff --git a/bab2_if-else/screenshoot/perbandingan_bilangan.png b/bab2_if-else/screenshoot/perbandingan_bilangan.png deleted file mode 100644 index 84cf01c..0000000 Binary files a/bab2_if-else/screenshoot/perbandingan_bilangan.png and /dev/null differ diff --git a/bab2_if-else/screenshoot/perbandingan_huruf.png b/bab2_if-else/screenshoot/perbandingan_huruf.png deleted file mode 100644 index 3bcd6ba..0000000 Binary files a/bab2_if-else/screenshoot/perbandingan_huruf.png and /dev/null differ diff --git a/justlearning/IO.py b/justlearning/IO.py new file mode 100644 index 0000000..5cd7f2b --- /dev/null +++ b/justlearning/IO.py @@ -0,0 +1,3 @@ +nama = 'Poncoe' +lenkata = nama[0:10] +print(lenkata) diff --git a/justlearning/ListTuple.py b/justlearning/ListTuple.py new file mode 100644 index 0000000..52bec15 --- /dev/null +++ b/justlearning/ListTuple.py @@ -0,0 +1,39 @@ +# Operator (oprator) + +a = 2 +b = 4 + +# Oprator + + +hasiltambah = a + b +print(hasiltambah) + +# Oprator - + +hasilkurang = a - b +print(hasilkurang) + +# Oprator * + +hasilperkalian = a * b +print(hasilperkalian) + +# Oprator ** + +hasilpangkat = a ** b +print(hasilpangkat) + +# Oprator / + +hasilpembagian = a / b +print(hasilpembagian) + +# Oprator // (div) + +hasildiv = a // b +print(hasildiv) + +# Oprator % (Mod) + +hasilmod = a % b +print(hasilmod) diff --git a/justlearning/Listtuple_part2.py b/justlearning/Listtuple_part2.py new file mode 100644 index 0000000..a6f656a --- /dev/null +++ b/justlearning/Listtuple_part2.py @@ -0,0 +1,18 @@ +# LIST + +##L1 = [62,13,73,13,235,1231,1,24,6] +####L1.insert(3,60) +####L2 = [7,8,9,10] +####L1.extend(L2) +####L.append(7) +####L.append('Poncoe') +####L1.reverse() +##L1.sort() +##print(L1) + +# TUPLE + +TA = (1,2,3,4,5,6) +TB = ('a','b','c') +TC = TA + TB +print(TC) diff --git a/justlearning/file.txt b/justlearning/file.txt new file mode 100644 index 0000000..6124801 --- /dev/null +++ b/justlearning/file.txt @@ -0,0 +1,17 @@ +Python sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah +Python Sangat Mudah \ No newline at end of file diff --git a/justlearning/filemodul.py b/justlearning/filemodul.py new file mode 100644 index 0000000..06cfd75 --- /dev/null +++ b/justlearning/filemodul.py @@ -0,0 +1,46 @@ +# r = baca file / read file +# r+ = baca & tulis file / read & write +# w = nulis file / write file +# w+ = nulis dan baca file / read & write +# JSON = Javascript ON + +##coe = open("file.txt", "w") +##coe.write("Python sangat Mudah") +##coe.close() + +##coe = open("file.txt", "r+") +##vue = coe.read() +##i = 0 +## +##for index,item in enumerate(vue): +## if item == " ": +## pass +## else: +## i = i + 1 +##k = 1 +##while k=0 and L[z] < n: +## L[z+1] = L[z] +## z = z - 1 +## L[z+1] = n +##print("Nilai Terurut = ",L) + +#Buble Sort + +x = len(L) +for i in range(x): + for y in range(x-i-1): + if L[y]> L[y+1]: + pindah = L[y] + L[y] = L[y+1] + L[y+1] = pindah + +if (y%2==0): + bmedian = x / 2 -1 + bmendianyo = int(bmedian) + hasil = [L[bmendianyo], L[bmendianyo+1]] +else : + bmendianyo = (y+1) / 2 - 1 + bmendianyo = int(bmedian) + hasil = [L[bmendianyo]] + +print("Sort =",L) +print("MIN = ",min(L)) +print("MAX = ",max(L)) +print("Median = ",hasil) diff --git a/justlearning/test.py b/justlearning/test.py new file mode 100644 index 0000000..5ea08b2 --- /dev/null +++ b/justlearning/test.py @@ -0,0 +1,4 @@ +# Input +nama = input("Masukan Nama = ") +# Output +print(nama)

AltStyle によって変換されたページ (->オリジナル) /