Advertisement
farrismp

Algorithm

May 1st, 2019
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. Algorithm for Players Scores
  2. Repeat until all a players scores have been recorded
  3. Get points scored in game ( for )
  4. Get points conceded in game ( against )
  5. Add the difference to list ( for - against )
  6. When all scores have been input
  7.  
  8. Set Difference, games_played variables to 0
  9. For each item in the list
  10. Add its value to Difference
  11. Add 1 to games_played
  12.  
  13. When all items in the list have been processed
  14.  
  15. Print players average ( Difference )
  16. Print their best win is Max value in list
  17. Print their worst defeat is the Min value in list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement