Answered step by step
Verified Expert Solution
Question
1 Approved Answer
please write a code Write a function computer-price() that takes the following arguments, in this order, and computes the price of a computer: 1. cpu:
please write a code
Write a function computer-price() that takes the following arguments, in this order, and computes the price of a computer: 1. cpu: the manufacturer of the CPU, which must be "Intel" or "AMD" (capitalized just so) 2. ghz: the gigahertz rating of the CPU, which must be a positive number 3. disk.type: the disk type, which must be "SSD" or "HDD" (capitalized just so 4. disk.size: the disk's size in gigabytes, which must be a positive number The base price of the computer is $1000. Components add to the computer's price as follows: An Intel processor adds $200. An AMD processor adds $175. A CPU running at 2 GHz or higher adds $150. A CPU running at 1 GHz or higher (but less than 2 GHz) adds $80. A solid state disk (SSD) adds $225. . A hard disk (HDD) adds $100 Each gigabyte of disk space costs $2Step 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