Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Decisions: IN PYTHON A new business needs a program to determine the net cost of a new phone they have designed, and determine the expected

image text in transcribed

image text in transcribed

image text in transcribed

Decisions: IN PYTHON A new business needs a program to determine the net cost of a new phone they have designed, and determine the expected profit based on sales price and total cost. They will also be selling this phone in India, China, and Europe so conversions of the net cost will also be required. What to do: The input data will only be the phone name, sales price, and chipset (either Qualcomm's Snapdragon 810 or Kirin 940) and which currency conversions the users wishes to do. Start with a flowchart or pseudo code BEFORE you start to code. This document will be required prior to seeking professor help. Input Validation You will need to perform input data validation to make sure the user gives valid inputs. An appropriate message should be displayed if invalid data is entered. Here are the rules for data validation: The phone name must begin wth an alphabetic character. Other than that it can contairn alphabetic characters, numeric digits, and spaces, but no other characters. The sales price can contain a dollar sign, but other than that it must be numeric. Also, the sales price must be at least $100. It may include dollars and cents. The chipset must start with either "S" or "K. However, it doesn't matter whether the user enters upper case or lower case Calculating costs and profit You need to perform the following calculations to determine costs of chipset, memory, camera, battery, and display. The sum of all these costs form the total cost of manufacturing the phone The chipset costs are calculated as follows Snapdragon costs 60% of sales price Kirin costs 50% of sales price However, it's possible to get a Kirin discount If they qualify the Kirin discount, the chipset cost is only 40% of sales price In addition, the cost of memory is based on the sale price as follows: For sales price at least $500, the memory cost is $100 For sales price at least $300 but less than $500, the memory cost is $90 For sales price less than $300, the memory cost is $80 Other expenses: Camera (5% of Sales price) Battery (Integer division by 22 of Sales Price) Display (ASCII value of the first letter of the phone name) Profit is calculated as sales price minus total costs. NOTE: if the cost exceeds the sales price you must give the user a warning message to that effect

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

Concepts Of Database Management

Authors: Joy L. Starks, Philip J. Pratt, Mary Z. Last

9th Edition

1337093424, 978-1337093422

More Books

Students also viewed these Databases questions

Question

Homework Lab B 16 pstion list Duention 6

Answered: 1 week ago