Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- happiness_str = input()
- happiness_values = list(map(int, happiness_str.split()))
- improvement_factor = int(input())
- new_happiness_scores = [h * improvement_factor for h in happiness_values]
- average_happiness = sum(new_happiness_scores) / len(new_happiness_scores)
- happy_count = sum(1 for score in new_happiness_scores if score >= average_happiness)
- total_count = len(new_happiness_scores)
- if happy_count >= total_count / 2:
- print(f"Score: {happy_count}/{total_count}. Employees are happy!")
- else:
- print(f"Score: {happy_count}/{total_count}. Employees are not happy!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement