Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- movie = input()
- scores, movies, counter = [], [], 0
- while movie != "STOP":
- score = 0
- counter += 1
- for i in movie:
- i = ord(i)
- score += i
- if i in range(97, 123):
- score -= 2 * len(movie)
- elif i in range(65, 91):
- score -= len(movie)
- scores.append(score)
- movies.append(movie)
- if counter == 7:
- winner = max(scores)
- winner_name = movies[scores.index(winner)]
- print(f"The limit is reached.")
- print(f"The best movie for you is {winner_name} with {winner} ASCII sum.")
- break
- movie = input()
- else:
- winner = max(scores)
- winner_name = movies[scores.index(winner)]
- print(f"The best movie for you is {winner_name} with {winner} ASCII sum.")
Add Comment
Please, Sign In to add comment