Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- computers = int(input())
- total_rating = 0
- total_sales = 0
- sale = 0
- for i in range(computers):
- num = int(input())
- rating = num % 10
- possible_sales = (num - rating) / 10
- total_rating += rating
- if rating == 3:
- sale = possible_sales * 0.50
- elif rating == 4:
- sale = possible_sales * 0.70
- elif rating == 5:
- sale = possible_sales * 0.85
- elif rating == 6:
- sale = possible_sales * 1
- else:
- sale = 0
- total_sales += sale
- print(f"{total_sales:.2f}")
- print(f"{(total_rating/computers):.2f}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement