Guest User

Untitled

a guest
Jun 24th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. n = int(input())
  2. people = []
  3. song = ["Happy", "birthday", "to", "you", "Happy", "birthday", "to", "you", "Happy", "birthday", "to", "Rujia", "Happy", "birthday", "to", "you"]
  4. for i in range(n):
  5. people.append(input().title())
  6. i = j = 0
  7. flag = False
  8. while True:
  9. print("{:s}: {:s}".format(people[i], song[j]))
  10. if (i == n - 1):
  11. flag = True
  12. if (j == (len(song) - 1) and flag):
  13. break;
  14. i += 1
  15. j += 1
  16. if (i >= n):
  17. i = 0
  18. if (j >= len(song)):
  19. j = 0
Add Comment
Please, Sign In to add comment