Question 1: Operators

Write a Python program to find out how many toy coins a child has collected.

  • Start by asking for the child’s name and store it in a variable called name.
  • Ask how many gold coins they have and store it in a variable called gold_coins (as an integer).
  • Ask how many silver coins they have and store it in a variable called silver_coins (as an integer).
  • Ask how many bronze coins they have and store it in a variable called bronze_coins (as an integer).
  • Calculate the total number of toy coins by adding gold_coins, silver_coins, and bronze_coins and store it in a variable called total_coins.
  • Print a message that includes the child’s name and the total number of toy coins in a friendly sentence, like this: “Hi [name]! You have collected a total of [total_coins] toy coins.”
Write what you are looking for, and press enter to begin your search!