#This program will ask for a name and age. It will check the age range and #display a message. #Collect input name = input('What is your name? ') print(f'Kia ora {name}') budget = float(input(f'How much is your budget to spend {name}? ')) if budget < 4.5: print("You don't have enough money for anything") import sys sys.exit(0) elif budget < 6: print("You can't buy a pie or a smoothie") elif budget < 6.5: print("You can't buy a smoothie") #food item variables smoothie = 6.5 pie = 6 wedges = 4.5 new_budget = 0 keep_going = '' while keep_going == '': if budget < 4.5: print("You don't have enough money for anything else") break elif budget < 6: food = input('Are you going to buy wedges ($4.50)? type the name of your answer (e.g "wedges") ') elif budget < 6.5: food = input('Are you going to buy wedges ($4.50) or pie ($6.00)? type the name of your answer (e.g "wedges") ') else: food = input('Are you going to buy wedges ($4.50), pie ($6.00) or smoothie ($6.50)? type the name of your answer (e.g "wedges") ') if food == 'smoothie': new_budget = budget - smoothie if food == 'smoothie' and new_budget < 0: print("You don't have enough money to buy that") elif food == 'smoothie' and new_budget >= 0: print(f'{name} you selected smoothie, you have {new_budget} remaining.') budget = new_budget elif food == 'pie': new_budget = budget - pie if food == 'pie' and new_budget < 0: print("You don't have enough money to buy that") elif food == 'pie' and new_budget >= 0: print(f'{name} you selected pie, you have {new_budget} remaining.') budget = new_budget elif food == 'wedges': new_budget = budget - wedges if food == 'wedges' and new_budget < 0: print("You don't have enough money to buy that") elif food == 'wedges' and new_budget >= 0: print(f'{name} you selected wedges, you have {new_budget} remaining.') budget = new_budget else: print('You have entered an invalid option') if budget < 4.5: print("You don't have enough money for anything else") break keep_going = input('Do you want to select another item? Press enter if yes, type no if no. ') #Display output print('The program has ended')