Aussie Rules

Challenge
No

Australian Rules is a type of football. You score points by getting the ball between posts at either end of the field:

Goal posts

If the ball goes between the center two posts, that's a goal, and is worth six points. If the ball goes between one of the center and outside posts, that's a behind, and is worth one point.

Write a Python program for computing the score, given the number of goals and behinds. Here's sample I/O:

  • How many goals? 8
  • How many behinds? 2
  • Score: 50

Include comments for the IPO pattern.

Upload a zip file of the project folder. The usual coding standards apply.

Where referenced