Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- months = int(input())
- water = 0
- internet = 0
- elec_total = 0
- other_total = 0
- total = 0
- for i in range(months):
- elec_bill = float(input())
- other = (elec_bill + 20 + 15) * 1.2
- other_total += other
- water += 20
- internet += 15
- elec_total += elec_bill
- total += other_total + internet + water + elec_total
- print(f"Electricity: {elec_total:.2f} lv")
- print(f"Water: {water:.2f} lv")
- print(f"Internet: {internet:.2f} lv")
- print(f"Other: {other_total:.2f} lv")
- print(f"Average: {(total / months):.2f} lv")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement