Add courses to the cart: Customer will only be able to add a course if the title is in the master’s list. Once added, the course name and its price need to be added to a shopping cart list, the information - title and price - needs to be separated (as in master list) by any delimiter of your choice (like: colon, space, dash etc). Customer should be able to view the shopping cart list after adding a course. Delete a course from cart: Customer will enter the name of the course and the program will look for the course in the shopping cart list to be deleted from. View the shopping cart list after deletion. Check out course: Customer should be able to view the list of the courses and their individual price that are being selected by the user, then view the total price of all the courses in the shopping cart. Again, you need to use a for loop to iterate over the shopping list, separate the title and price and view the information as shown in sample I/O. Directly printing the list will deduct points. . Exit/terminate the program. NOTE: The customer shopping cart should be implemented as a separate list. Any addition/deletion of items should be done in this list. Courses should not be added or deleted from the master course list. • The program needs to handle uppercase and lowercase letter. Customer can enter the name that can have all small letter but the program should still be able to find the course if in the master list. You can use str.lower() – converts all letters to lower case or str.upper() – converts all letters to uppercase or str.title() – converts first letter of a word to uppercase in str. • You need to write a pseudocode for the planning of the program and needs to be submitted inside the template file. SAMPLE TEMPLATE NEEDS TO FOLLOW THIS: Enter option: 2 Enter course title to add to cart: Fundamentals of Python *********** Your Cart *********** Title--price Fundamentals of Python--$14.88 ********************** Available options: 1: View Courses 2: Add course 3: Delete a course 4: Checkout 5: Exit Enter option: 2 Enter course title to add to cart: Full Stack Development *********** Your Cart *********** Title--price Fundamentals of Python--$14.88 Full Stack Development --$12.99 ********************** Available options: 1: View Courses 2: Add course 3: Delete a course 4: Checkout 5: Exit Enter option: 3 Enter course title to delete: Fundamentals of Python Fundamentals of Python Fundamentals of Python deleted from cart *********** Your Cart *********** Title--price Full Stack Development --$12.99 ********************** Available options: 1: View Courses 2: Add course 3: Delete a course 4: Checkout 5: Exit Enter option: 2 Enter course title to add to cart: Cyber Security *********** Your Cart *********** Title--price Full Stack Development --$12.99 Cyber Security --$10.99 ********************** Available options: 1: View Courses 2: Add course 3: Delete a course 4: Checkout 5: Exit Enter option: 4 *********** Your Cart *********** Full Stack Development --12.99 Cyber Security --10.99 Your Total: 23.98 ********************** Available options: 1: View Courses 2: Add course 3: Delete a course 4: Checkout 5: Exit Enter option: 5
Add courses to the cart: Customer will only be able to add a course if the title is in the master’s list.
Once added, the course name and its price need to be added to a shopping cart list, the information -
title and price - needs to be separated (as in master list) by any delimiter of your choice (like: colon,
space, dash etc). Customer should be able to view the shopping cart list after adding a course.
Delete a course from cart: Customer will enter the name of the course and the program will look
for the course in the shopping cart list to be deleted from. View the shopping cart list after deletion.
Check out course: Customer should be able to view the list of the courses and their individual
price that are being selected by the user, then view the total price of all the courses in the
shopping cart. Again, you need to use a for loop to iterate over the shopping list, separate the title
and price and view the information as shown in sample I/O. Directly printing the list will deduct
points.
. Exit/terminate the program.
NOTE:
The customer shopping cart should be implemented as a separate list. Any addition/deletion
of items should be done in this list. Courses should not be added or deleted from the master
course list.
• The program needs to handle uppercase and lowercase letter. Customer can enter the name
that can have all small letter but the program should still be able to find the course if in the
master list. You can use str.lower() – converts all letters to lower case or str.upper() – converts
all letters to uppercase or str.title() – converts first letter of a word to uppercase in str.
• You need to write a pseudocode for the planning of the program and needs to be
submitted inside the template file.
SAMPLE TEMPLATE NEEDS TO FOLLOW THIS:
Enter option: 2
Enter course title to add to cart: Fundamentals of Python
*********** Your Cart ***********
Title--price
Fundamentals of Python--$14.88
**********************
Available options:
1: View Courses
2: Add course
3: Delete a course
4: Checkout
5: Exit
Enter option: 2
Enter course title to add to cart: Full Stack Development
*********** Your Cart ***********
Title--price
Fundamentals of Python--$14.88
Full Stack Development --$12.99
**********************
Available options:
1: View Courses
2: Add course
3: Delete a course
4: Checkout
5: Exit
Enter option: 3
Enter course title to delete: Fundamentals of Python
Fundamentals of Python
Fundamentals of Python deleted from cart
*********** Your Cart ***********
Title--price
Full Stack Development --$12.99
**********************
Available options:
1: View Courses
2: Add course
3: Delete a course
4: Checkout
5: Exit
Enter option: 2
Enter course title to add to cart: Cyber Security
*********** Your Cart ***********
Title--price
Full Stack Development --$12.99
Cyber Security --$10.99
**********************
Available options:
1: View Courses
2: Add course
3: Delete a course
4: Checkout
5: Exit
Enter option: 4
*********** Your Cart ***********
Full Stack Development --12.99
Cyber Security --10.99
Your Total: 23.98
**********************
Available options:
1: View Courses
2: Add course
3: Delete a course
4: Checkout
5: Exit
Enter option: 5
*********** Thank you for shopping with us ***********
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images