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

10
Tugas/b.py Normal file
View File

@@ -0,0 +1,10 @@
def jumlah_deret(n):
if n == 0:
return 0
else:
return n + jumlah_deret(n - 2)
bilangan = 8
hasil = jumlah_deret(bilangan)
print(f"Jumlah deret dari 1 sampai {bilangan} adalah {hasil}")