Have you ever wondered how computer manufacturers calculate the price of a custom PC? Or maybe you have dreamed of building your own computer but were not sure how much it would cost? In this Python challenge, you’ll step into the shoes of a computer builder! Your mission: write a program that lets users pick their ideal hardware components and generates a quote price for their custom computer.
Your Challenge
For this challenge you will create a Python program that:
- Displays a menu of hardware options (e.g., screen size, RAM, CPU, storage).
- Lets the user select their preferred components.
- Calculates the total price based on their choices.
- Outputs a detailed quote with the selected specifications and total cost.
Hardware Options
Your program should allow users to customise at least the following components:
Component | Options (with Base Prices) |
---|---|
Screen Size | 13″ (£50), 15″ (£100), 17″ (£150) |
RAM | 8GB (£40), 16GB (£80), 32GB (£150) |
CPU Clock Speed | 2.5GHz (£100), 3.2GHz (£200), 4.0GHz (£350) |
Storage | 256GB HDD (£30), 512GB SSD (£60), 1TB SSD (£120) |
Graphics Card | Integrated (£0), Dedicated (£150), High-End (£400) |
Feel free to add more components or options in your code!
Sample Output
Welcome to the Custom Computer Quote Generator! Please select your screen size: a. 13" (£50) b. 15" (£100) c. 17" (£150) > b Please select your RAM: a. 8GB (£40) b. 16GB (£80) c. 32GB (£150) > b Please select your CPU clock speed: a. 2.5GHz (£100) b. 3.2GHz (£200) c. 4.0GHz (£350) > c Please select your storage: a. 256GB HDD (£30) b. 512GB SSD (£60) c. 1TB SSD (£120) > c --- Your Custom Computer Quote: - Screen Size: 15" (£100) - RAM: 16GB (£80) - CPU: 4.0GHz (£350) - Storage: 1TB SSD (£120) TOTAL PRICE: £650 ---
Python Code
We have started the code for you but you will need to complete it to:
-
Let the user pick up more hardware options
Calculate and output the total cost of the PC
Display a summary of the selected hardware specifications
Extension Task: Entering a Discount Code
Once the user has made their selection, they should be prompted to enter a voucher code. The system currently accepts the following three voucher codes:
- PROMO-10 which gives a 10% discount on the total cost of the computer.
- PROMO-20 which gives a 20% discount on the total cost of the computer.
- PROMO-30 which gives a 30% discount on the total cost of the computer but is only applicable on computers costing £600 or more.

Solution...
The solution for this challenge is available to full members!Find out how to become a member:
➤ Members' Area