Question
Write a program called a2_p3.py where you will be adding options to the previously written code so that users can pay by different methods. Modify
Write a program called a2_p3.py where you will be adding options to the previously written code so that users can pay by different methods. Modify your code from the previous part so that once the customer finishes selection from the menu and sees the receipt, they are presented with one final menu. This menu should allow the customer to select the payment options. Their choices should be: (a) Cash (b) One time pay card Again, the user should make their selection by entering the corresponding number, and bad selections should cause the menu to repeat. If the customer chooses Cash it should print that payment is completed and the program should terminate. If the choice is One-time pay card then your program asks for the 4-digit card number and displays the invoice as follows (see the sample output) and terminates. Note: To display the sample 4-digit number 2345 as xx45 you must not use any string processing functions. Instead, you should use arithmetic operators that we covered in class
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started