Python Forum
my coding does not running, please help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
my coding does not running, please help
#1
im beginner,
nama=[] 
gaji=[]
emas=[]
zakat=[]
pertahun=[]
perbulan=[]
nisab=[]
print ('+———————————————–+')
print ('| Penghitung Zakat Penghasilan |')
print ('| menurut pendapatan kasar (brutto) |')
print ('| |')
print ('+———————————————–+')
data=int(input('Masukan banyak data : '))
print('==========================================')

for i in range(data):
a = input('Masukan nama : ')
nama.append(a)
b = int(input('Masukan harga emas saat ini: '))
emas.append(b)
c = int(input('Masukkan penghasilan Anda per bulan : '))
gaji.append(c)
print()

for i in range(data):
d = 12 * gaji[i]
pertahun.append(d)
e = 0.025 * pertahun[i]
zakat.append(e)
f = 85 * emas[i]
nisab.append(f)
g = zakat[i] / 12
perbulan.append(g)

for i in range(data):
print ()
print('—————————————-')
print(' Zakat Penghasilan (Brutto)')
print('—————————————-')
print('Nama :',nama[i])
print('Harga 1 gram emas :','Rp.',emas[i])
print('Penghasilan per bulan :','Rp.',gaji[i])
print('Penghasilan per tahun :','Rp.',pertahun[i])
print('Harga nishab (85 gram emas) :','Rp.',nisab[i])
print('Zakat penghasilan :','2.5% x',pertahun[i],'=','Rp.',zakat[i])
if pertahun[i] >= nisab[i]:
print('Keterangan : WAJIB Zakat Rp.',zakat[i],'/tahun')
print(' atau Rp. ',perbulan[i],'/bulan')
print()
if pertahun[i] <= nisab[i]:
print('Keterangan : Anda belum termasuk Wajib Zakat')
Reply
#2
Re post your code with indentation,there is no indentation(4-space) in code now.
Reply
#3
it's work, thank Smile

(Apr-20-2019, 10:41 AM)indora Wrote: it's work, thank Smile
(Apr-20-2019, 10:26 AM)snippsat Wrote: Re post your code with indentation,there is no indentation(4-space) in code now.
it's work, thanks
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  May i ask how i can stop my coding running christing 4 2,548 Oct-03-2019, 12:25 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020