Answered step by step
Verified Expert Solution
Link Copied!

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:

image text in transcribedplease 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 $2

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems An Application Oriented Approach Complete Version

Authors: Michael Kifer, Arthur Bernstein, Richard Lewis

2nd Edition

0321268458, 978-0321268457

More Books

Students also viewed these Databases questions

Question

what can range names not start with

Answered: 1 week ago