-
-
Notifications
You must be signed in to change notification settings - Fork 33.7k
Closed as not planned
Labels
Description
total_belanja = float(input("Masukkan total belanja: Rp "))
if total_belanja > 500000:
diskon = 0.2
elif 200000 <= total_belanja <= 500000:
diskon = 0.1
else:
diskon = 0
bayar = total_belanja * (1 - diskon)
print(f"Diskon: {diskon*100}%")
print(f"Total bayar: Rp {bayar}")
n = int(input("Masukkan jumlah baris: "))
for i in range(1, n+1):
print("*" * i)
for i in range(n, 0, -1):
print("*" * i)