This commit is contained in:
Chizuui
2025-11-27 00:38:38 +07:00
parent 5444efab13
commit 1795fa1c2f
81 changed files with 1893 additions and 0 deletions

7
Acara-10/loop.py Executable file
View File

@@ -0,0 +1,7 @@
angka = [1,2,3,4,5,6,7,8,9,10]
jumlah = 0
for i in angka:
jumlah = jumlah + i
print ('jumlah =', jumlah)

6
Acara-10/lopping.py Executable file
View File

@@ -0,0 +1,6 @@
jumlah = 5
while jumlah > 0:
print (jumlah)
jumlah -= 1
print("selesai")

5
Acara-10/nasted-loop.py Executable file
View File

@@ -0,0 +1,5 @@
for baris in range(5):
for kolom in range(7):
print('*', end=' ')
else :
print('')

13
Acara-10/while-true.py Executable file
View File

@@ -0,0 +1,13 @@
angka = 0
while True :
print(angka)
angka = angka + 1
if angka == 2:
print("skip")
continue
if angka == 5:
print ("break")
break
print("selesai")