Question 24: Minecraft

Ade is a football player who played 10 matches this season. In each match, he scored 2 goals. He also received a total of 3 yellow cards during the season.

Task:

  1. Type Ade’s name and store it in a variable called name.

  2. Store the number of matches played in a variable called matches and set it to 10.

  3. Store the goals per match in a variable called goals_per_match and set it to 2.

  4. Store the total yellow cards in a variable called yellow_cards and set it to 3.

  5. Calculate the total goals by multiplying matches by goals_per_match.

  6. Calculate the goal difference by subtracting yellow_cards from the total goals.

  7. Calculate the average goals per match by dividing total goals by matches.

  8. Print a message that includes Ade’s name, total goals, goal difference, and average goals per match.

Write what you are looking for, and press enter to begin your search!