Lab 4: Lists
Learning Outcomes
In a soccer match, a win is worth 3 points, a tie is worth 1 point, and a loss is worth 0 points. Due to poor record-keeping, the MSU KickCats know how many games they played each season, as well as the total points they earned for each season. The team has hired you to write a program that recreates the possible combinations of wins, ties and losses for each season.
Assignment
Learning Outcomes
- Gain experience manipulating lists.
- Continue gaining experience using functions, iteration and boolean expressions.
In a soccer match, a win is worth 3 points, a tie is worth 1 point, and a loss is worth 0 points. Due to poor record-keeping, the MSU KickCats know how many games they played each season, as well as the total points they earned for each season. The team has hired you to write a program that recreates the possible combinations of wins, ties and losses for each season.
Assignment
- Download lab4.py
- Replace the pass construct in each function with the necessary Python code to produce this output.
- There will always be at least one legal combination of wins, ties and losses.
- 2 points - The output format is matched exactly.
- 8 points - Your program will be graded using a different value for soccer_seasons. For each season that produces the correct output, you will earn (8 / number_of_seasons) points. Test Data: soccer_seasons = [[1, 3], [1, 1], [1, 0], [2, 3], [2, 4], [10, 15], [10, 16], [10, 17]]