Advertisement
Guest User

Untitled

a guest
Mar 20th, 2019
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.68 KB | None | 0 0
  1. A) hi-5's both hands of a single person
  2. -----------
  3. for each hand on the person:
  4. hi-5 dat hand
  5. -----------
  6. (runs twice because two hands on one person)
  7.  
  8. B) hi-5's both hands of each person in the room
  9. -----------
  10. people_counter = 2
  11. for each person
  12. for each hand on the person:
  13. hi-5 dat hand
  14. -----------
  15. (runs four times because two hands on each of the two people)
  16.  
  17.  
  18. C) hi-5's both hands of each person in each room
  19. -----------
  20. room_counter = 2
  21. people_counter = 2 #assume each room has 2 people in it
  22. for each room
  23. for each person
  24. for each hand on the person:
  25. hi-5 dat hand
  26. -----------
  27. (runs eight times because two hands on each of the two people in both rooms):
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement