Highlights
1. Introduction
Congratulations! You are finally launching the business you’ve been planning for years – an online PC shop! This shop will allow customers to buy from one of two main categories: custom builds (a computer that is built and customized to meet specific customer needs) and pre-built machines (complete systems assembled by well-known manufacturers using balanced hardware configurations). You currently only carry a relatively small (but powerful) inventory of items, but you want to give your customers the best experience possible anyway. You will be writing a program (using Python) that allows users to order items from your shop.
In this assignment, you will get practice with:
To begin, let’s note a few things. If your customers are building a computer, they absolutely must have these essential parts:
1. Central Processing Unit (CPU) for executing instructions
2. Motherboard for allowing communication between crucial components of the system.
3. Random Access Memory (RAM) for storing information that needs to be retrieved quickly.
4. Power Supply Unit (PSU) for powering the components within the system.
5. Either a Solid State Drive (SSD) or a Hard Disk Drive (HDD) (or both) for storage 6. A case for storing the components.
Often, people will also want a Graphics Card to add to their build if they plan on doing things like gaming, video editing, or 3D graphics modeling in which processing graphical data as efficiently as possible is important.
With that out of the way, let’s also note that sometimes certain PC parts are not compatible with each other within a build (for example, an Intel i7-11700K CPU and an MSI B550-A PRO motherboard are not compatible) and the PC will not work when a build is attempted. Your shop tries to ensure that all components can be used together in a build, however sometimes it’s just not possible.
Hardware Incompatibilities
As mentioned previously, some components are incompatible with each other. For example, some motherboards do not have the correct CPU socket (and supported chipset) for certain CPU models (this is all jargon you don’t need to be familiar with, but could research if you were interested).
Storage Selection
When purchasing storage (where data is permanently stored on your computer), the customer can either select an HDD, an SSD, or both. Thus, you must allow them to decline purchasing the HDD or the SSD if they wish. To ‘decline’, the user should be able to input ‘x’ OR ‘X’. If the user has already declined purchasing an SSD, you must ensure that they select a HDD. Examples of this are shown below.
Order of Component Selection
It is important to note that customers MUST purchase one CPU, one motherboard, one RAM option, one PSU option, one SSD or HDD (or BOTH – they can decline purchasing one or the other if they wish), and one case. In addition, recall that they do not NEED to purchase a graphics card – they can decline with ‘x’ or ‘X’.
What is Returned from pickItems?
When building a custom-build, once all of the parts are successfully picked, the total price of all the parts combined should be added to a list that will eventually be returned from pickItems() (once the user selects that they’re ready to checkout with ‘3’). The user, if they wish, can also continue to either build another PC (by pressing ‘1’), or add a pre-built PC to their cart (by pressing ‘2’).
The pickItems() function should return a list of prices of each PC ordered by one customer in the order that they were purchased. Again, one customer could order as many custom-built and pre-built machines as they wish (before pressing ‘3’ to checkout) and the total price of each should be returned in a list in the order that the customer purchased them once they do press ‘3’ to checkout.
This CS1026B – IT and Computer Science has been solved by our PHD Experts at My Uni Paper.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.