Question 23: Balloons

Write a Python program to find out how many balloons a child has left after giving some away.

  • Start by asking for the child’s name and store it in a variable called name.

  • Ask how many balloons they originally had and store it in a variable called original_balloons (as an integer).

  • Ask how many balloons they gave to friends and store it in a variable called given_balloons (as an integer).

  • Calculate how many balloons they have left by subtracting given_balloons from original_balloons and store it in a variable called balloons_left.

  • Print a friendly message that includes the child’s name and the number of balloons they have left, like this:

    “Hi [name]! After giving some away, you have [balloons_left] balloons left.”


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