Final answer:
To write a Python program that prompts the user for their amount of money and calculates how many Nintendo Wiis they can afford, follow the steps below...
Step-by-step explanation:
The steps of the python program are:
- Prompt the user to enter their amount of money as a floating-point number.
- Calculate the number of Nintendo Wiis the person can afford by dividing their amount of money by the price of a Wii.
- Calculate the additional amount of money needed to afford an additional Wii by subtracting the total cost of the Wiis the person can afford from their amount of money.
- Print the number of Nintendo Wiis the person can afford and the additional amount of money needed.
Here's an example program:
price_of_wii = 299.99
amount_of_money = float(input('Enter your amount of money: '))
number_of_wiis = int(amount_of_money // price_of_wii)
additional_money_needed = price_of_wii - (amount_of_money % price_of_wii)
print('You can afford', number_of_wiis, 'Nintendo Wiis')
print('You need', additional_money_needed, 'more money to afford an additional Wii')