Following Code will tabulate the dues of Members of Club :
Code::
def main():
fre={}
print("Enter Dues ,enter quit to end")
while True:
line=input()
if(line=='quit'):break
words=line.split(':')
fre[words[0]]=fre.get(words[0],0)+int(words[1])
for name in fre:
print(name+" has Paid Rs",fre[name],"in dues")
main()
Output::
Code::
def main():
fre={}
print("Enter Dues ,enter quit to end")
while True:
line=input()
if(line=='quit'):break
words=line.split(':')
fre[words[0]]=fre.get(words[0],0)+int(words[1])
for name in fre:
print(name+" has Paid Rs",fre[name],"in dues")
main()
Output::