Title | Programming IPO Chart |
---|---|
Author | Binny sheriff |
Course | programming 1 |
Institution | Centennial College |
Pages | 10 |
File Size | 229.3 KB |
File Type | |
Total Downloads | 46 |
Total Views | 150 |
Description Week 1 Create Programming IPO Chart...
PROGRAMMING FUNDAMENTALS: IPO CHARTS
IPO Chart Input LengthPerHouse [input] numOfHouses
Processing
Output
Assumptions:
TotalLength [Output]
1. All houses require the same type of wire. 2. The houses are the same average size
Processing Items:
None
Algorithm: 1. Enter lengthPerHouse and numOfHouses 2. Calculate totalLength of the wire by multiplying lengthPerHouse by numOfHouses
3. Display TotalLength
1.
SOLVABLE - Acme Builder’s Inc. has worked out that the wiring of an average house requires 45m of 14AWG wire. If a contractor has to wire 5 houses, what length of wire will be needed?
Sample Calculation / Desk-Checking Table lengthPerHouse [input]
numOfHouses [input]
totalLength [output]
45m
5
225m
1
PROGRAMMING FUNDAMENTALS: IPO CHARTS
2. Burnaby Farms wants to estimate the cost of fertilizing their fields for the coming year. Each hectare of cultivated land requires 15kg and they intend to work 300 hectares.
IPO Chart Input
Processing
Cost per hectare [input] Cost of fertilizer [input]
Assumptions: Number of hectares Cost for total area
Output TotalCost [input]
Algorithm: Cost of fertilizer Cost per hectare unknown
Sample Calculation / Desk-Checking Table Landarea [input]
numofhectres [input]
TotalCost [output]
300*15
Missing?
Costperhectre Costperfertilizer Missing?
Not solvable – Burnaby farms hasn’t listed the cost of the fertilizer for the land. All we know is the total hectares need to be fertilized is 300 and each hectare requires fertilizes is 15kg. Total fertilizer needed (kg) for the 300 hectares is expressed 300*15 = 4500kg.
2
PROGRAMMING FUNDAMENTALS: IPO CHARTS
3. Cherry Entertainment Corp. is looking into the profitability of hosting MMA XXII at the Rogers Center. The sale of tickets, broadcasting rights and advertising will gross approximately $2 million. How much profit will Cherry Entertainment Center make if Rogers Centre cost $800, 000?
IPO Chart Input
Processing
Gross Profit [input] Cost Rental
Assumptions: Gross revenue Cost of rental
Output Total Revenue [input]
Algorithm: 1. Enter Total revenue; 2. Enter Cost Rental; 3. Subtract Total Revenue - from Cost Rental 4. Display Profit
Sample Calculation / Desk-Checking Table Gross profit [input]
Cost rental [input]
Total Revenue [input]
1,200,000
$800,000
2,000,000
Solvable - You need to subtract total revenue (2million) from the cost of renting Rogers Centre (800k) to get the gross profit which is 1.2million. 1, 200, 000 - 800,000 = 2,000,000
3
PROGRAMMING FUNDAMENTALS: IPO CHARTS
4. Delta Airlines estimates that the fuel efficiency of a Boeing 747 jet is 12 liters per km. If the price of aviation fuel is $1 per liter, how much would it cost the airline to fly to New York and back from Toronto?
IPO Chart Input
Jetfuelperkm [input] CostFuelperliter Distance traveled
Processing Assumptions: liters per km fuel per liter Total distance traveled unknown
Output Totalcost [Output]
Sample Calculation / Desk-Checking Table
Jet fuel per km (12L) CostFuelperliter ($1) Distance traveled (?)
12*1*Distance(km)
Distance in km Toronto to New York and back (unknown)
Missing?
Totalcost [Output]
unknown
Not solvable - Delta airlines have not mentioned the total distance from Toronto to Ney York and back. There is no definitive answer to create an equation to solve this question accurately without information of distance traveled.
4
PROGRAMMING FUNDAMENTALS: IPO CHARTS
5. Estelle’s Grocery is having a back-to-school sale of up to 50% off on most food items. The price of potatoes is 11₵ per kg. A plastic bag costs 5₵. What will the total cost (potatoes and bag) if someone buys 25kg of potatoes? IPO Chart Input
Discountonfood[input] Priceofpotatos Costplasticbag
Processing
Output
Assumptions: 1. 1 plastic bag can contain 25kg 2. 50% discount on most food items Algorithm 1. Enter price of potatoes 2. Enter price of plastic bag 3. Enter quantity of potatoes 4. Enter bag capacity 5. Calculate cost of potatoes price of potatoes after discount multiply number of potatoes bought= 6. Calculate total cost = cost of potatoes + cost of bag 7. Display total cost
Total cost
Sample Calculation / Desk-Checking Table
Not solvable – Since this equation is missing information, it does not mention how much each bag can hold and how many plastics bags are given. Discount on food 0.11*0.5 = $0.055 Cost of potatoes (price after discount) = 0.055*25kg (total potatoes bought) = $ 1.375 Total Cost = .5 (Cost of plastic bag) + 1.375 = $1.38 0.11*25+0.05 = $2.80
5
PROGRAMMING FUNDAMENTALS: IPO CHARTS
6. Fancy Jewelers is located in the Scarborough Town Center on the second floor near to Wal-Mart. In their Boxing week sale earrings were priced at $20 per pair. If Narendra wants to get a pair for as many females in his family as he can. How many pairs can he get if he has $125? [You may assume that there are more females in his family than he can buy earrings.]
IPO Chart Input
Processing
Price per earing [input] Budget[input]
Output
Assumptions: 1. Bought similar earrings 2. How many females in his family? Algorithm: 1. Enter price of earrings 2. Enter budget 3. Calculation number of earing by dividing budget/price of earrings 4. Display total pair of earrings
Total pairs earrings [input]
Sample Calculation / Desk-Checking Table Price of earing
budget
Number of pairs earing [output]
$20
$125
6.25
This equation is solvable because all required information is available the answer is 6.25 and can only buy 6 pairs of earrings for the females in his family. You can’t buy a quarter of an earring they are not produced that way. I got 6 from dividing current budget of $125 by the price of the earing $20 this equals 6.25. 125/20 = 6.25 ~ Rounding to 6
6
PROGRAMMING FUNDAMENTALS: IPO CHARTS 7. Gerard The Plumber charges $1.25 per meter for pipe installation. Each join cost 90 ₵. How much will Gerard charge for a job that is 12m with 4 joins?
IPO Chart Input
Processing
Price per meter of pipe [input] Price of join Number of joins Length of pipe
Output
Assumptions 1. Installing the same type of pipe 2. Length of pipe is the same Algorithm: 1. Enter price per meter of pipe 2. Enter Price of join 3. Enter Number of joins 4. Enter Length of pipe 5. Calculate cost by a. multiplying price per meter pipe * length of pipe b. multiply price join x number of joins c. sum a + sum b 6. display total cost
Total cost
Sample Calculation / Desk-Checking Table Price per meter [input]
Number of joins [input]
Total Cost [output]
Length of pipe
Price of joins
Price per meter*length of pipe
Price of joins*number of joins
(Sum a) + (Sum b)
1.25*12=sum a (15)
.90*4= sum b (3.6)
$18.60
The total cost of pipe for 12 meters is $1.25/meter and 4 joins @ .90 cents/join equals $18.60 (4*.90) + (1.25*12) = 18.60
7
PROGRAMMING FUNDAMENTALS: IPO CHARTS
8. Last year at the CNE, the Halls family bought 50 ride tickets. If the Polar Express, the Ferris Wheel, the High Drop and the Water-Fall requires 15, 10, 12 and 9 tickets respectively, how many tickets will remain at the end of the day?
IPO Chart Input
Processing
Totalnumbertickets[input] Polarexpress Ferriswheel Highdrop Water-fall
Assumptions Each ride requires a single ticket Algorithm: 1. Enter total number of tickets bought 2. Add all tickets used on all rides 3. Enter total used tickets 4. Calculate remaining tickets subtract total tickets bought from used tickets 5. Display remaining tickets
Output
LeftoverTickets [Output]
Sample Calculation / Desk-Checking Table Total Tickets
Total used tickets
Tickets left over
50
15+10+12+9 = 46
4
Solvable - This Equations is solvable considering each ride required a single ticket. When you add all the tickets used 15+12+10+9 the sum of tickets used on all rides is 46. When you subtract 46 from the total number of tickets bought (50). The tickets remaining equal 4. Simple Calculation 50 – 46 = 4
8
PROGRAMMING FUNDAMENTALS: IPO CHARTS 9. Isabelle’s Confectionary sells a packet of Maynard’s sour drops for 25 ₵. Each packet contains approximately 30 candies. How many packets will Sarah get if she has $3?
IPO Chart Input
budget [input] Costofpacket
Processing
Output
1. Enter total budget 2. Enter cost of packet 3. Calculate total packets bought by dividing budget with cost per packet 4. Display total packets bought
Total packets bought
Sample Calculation / Desk-Checking Table Budget
Cost of packet
Total packets [Output]
$3.00
0.25
12
Solvable ~ Sample calculation is calculated by dividing the budget spent on candies by the cost of each packet which equals 12. 3/.25 = 12
9
PROGRAMMING FUNDAMENTALS: IPO CHARTS
10. Jake’s Towing Services works out of the Markham/Finch area. They charge $5.50 per km for towing in addition to a flat service fee of $18. What would be the cost of towing a Toyota RAV 4 from Morningside/Ellesmere to McCowan/Sheppard?
IPO Chart
Input
Processing
Towingfee [input] Flatrate Distncacetraveled
Assumptions Missing distance in km
Output
Total Cost [input]
Algorithm 1. cost per km $5.50/km + flat service fee $18 2. distance traveled
Sample Calculation / Desk-Checking Table Towing fee + Flat rate
Distance Traveled
Total Cost
$5.50/km + $18
Missing (Km)?
?
Not-solvable - Distance is not given, Jake’s towing cannot calculate the towing fee without the distance traveled from Morningside & Lawrence to McCowan and Sheppard (Km).
10...