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 print
the results back to the user.
Need some help? Click here to reveal a video walkthrough for this task!
goals
and behinds
they scored. It should then print
this value onto the screen.goals
and behinds
are set to 2
and 10
by 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