Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #initialize total_rent to 0
- total_rent = 0
- #use for loop to enter rents for 10 shops
- for i in range(10):
- shop_rent = float(input("Enter rent:"))
- # add the shop_rent to the total_rent
- total_rent = total_rent + shop_rent
- # calculate the average rent
- average_rent = total_rent / 10
- # output the total rent and the average rent
- print("Total Rent is AED: ", total_rent)
- print("Average rent is AED:", average_rent)
Advertisement
Add Comment
Please, Sign In to add comment