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.”
We’re always looking for international STEM educators to join our team. If you are interested, please send us a mail and we’ll get back to you!
If you have any questions, kindly send us a mail. Don’t forget to follow and like all our social accounts to get updates on competitions!