Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n = int(input())
- red_p = 0
- orange_p = 0
- yellow_p = 0
- white_p = 0
- black_p = 0
- other_p = 0
- red = 0
- orange = 0
- yellow = 0
- white = 0
- black = 0
- other = 0
- all_points = 0
- for _ in range(n):
- balls = input()
- if balls == "red":
- red += 1
- # red_p += 5
- all_points += 5
- elif balls == "orange":
- orange += 1
- # orange_p += 10
- all_points += 10
- elif balls == "yellow":
- yellow += 1
- # yellow_p += 15
- all_points += 15
- elif balls == "white":
- white += 1
- # white_p += 20
- all_points += 20
- elif balls == "black":
- black += 1
- # black_p += 1
- all_points /= 2
- else:
- # other_p += 1
- other += 1
- # total = (red_p + orange_p + yellow_p + white_p)
- #
- # for _ in range(black_p):
- # total //= 2
- print(f"Total points: {int(all_points)}")
- print(f"Red balls: {red}")
- print(f"Orange balls: {orange}")
- print(f"Yellow balls: {yellow}")
- print(f"White balls: {white}")
- print(f"Other colors picked: {other}")
- print(f"Divides from black balls: {black}")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement