To helps students understand that variables are not just for storing data, but can also be combined with operators to perform useful calculations, students will create a Pocket Money Calculator. The program will first ask the user to enter the amount of pocket money they have, then the amount they spent during the day, and finally calculate and display the money left.
Output example:
Enter your pocket money: 50
How much did you spend today? 20
You still have 30 dollars left
Answer example:
wallet = int(input("Enter your pocket money: "))
spent = int(input("How much did you spend today? "))
left = wallet - spent
print("You still have", left, "dollars left")