The second activity that you’ll do is modify some Python code to calculate the total points scored by a W/AFL (Aussie rules football) team.
In the editor below, fill in the blanks (
________) so that the program calculates the number of points scored by the team, and
Need some help? Click here to reveal a video walkthrough for this task!
behindsthey scored. It should then
behindsare set to
10by default. Goals are worth 6 points and behinds are worth 1 point, so the score for 2 goals and 10 behinds would be
2 * 6 + 10 = 22!
Below is an example of how the program should run:
Number of goals scored: 2 Number of behind scored: 10 Total score: 22