Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Expenditure calculator \n_____________________________\nEnter q to quit and show result\n")
- sum = 0
- dict = {}
- while True:
- n = input("Enter item :")
- if n == "q":
- break
- p = float(input("enter price :"))
- sum = sum + p
- dict[n] = p
- print(dict)
- print(sum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement