Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quote = int(input())
- pay = 0
- get = 0
- fish_count = 0
- for fish in range(1, quote + 1):
- fish_name = input()
- if fish_name == "Stop":
- break
- else:
- fish_weight = float(input())
- fish_price = 0
- fish_count += 1
- for char in fish_name:
- char = ord(char)
- fish_price += char
- fish_price /= fish_weight
- if fish_count % 3 != 0:
- pay += fish_price
- else:
- get += fish_price
- if fish_count == quote:
- print(f"Lyubo fulfilled the quota!")
- if pay > get:
- print(f"Lyubo lost {(pay - get):.2f} leva today.")
- else:
- print(f"Lyubo's profit from {fish_count} fishes is {(get - pay):.2f} leva.")
Advertisement
Add Comment
Please, Sign In to add comment