my food ordering program in python prompts the user to type the name of a food an then enter, it checks if food is in the dictionary, and then it keeps prompting the user to add more food and then the user can finish adding by pressing ctrl+d on the keyboard and this prints the total price of all the food selected. However, the last prompt before the user exits the program gets printed to the terminal as well, which I don’t want. below is the terminal output, for instance:
Item: taco
Item: taco
Item:
Total: $6.00
that last instance of the prompt to the user gets displayed to terminal already, before the user gets to exit the program, how do i override that last ‘Item: ‘ and just go straight to total?
Oloche Aboje is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.