Coding Task: 01.02 W/AFL Points

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.

Your Task

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.

Requirements

  • The program should run without any errors.
  • The program should calculate the total score of the team based on the number of goals and behinds they scored. It should then print this value onto the screen.
  • Hint: 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!

Example

Below is an example of how the program should run:

Number of goals scored:
2
Number of behind scored:
10
Total score:
22
Scroll to Top