Portfolio Program #1 (from Ch.02):                  

Write a program that asks the user to input the length, width, and height of a cube. 

 

Sample output:   The area of the cube is:  36

 

 
Portfolio Program #2 (from ch.03)  

                                                    
You work for a sporting goods distributor.  This program asks the user to input the number of golf gloves that are to be ordered. 

Sample output should look like this:

 
For 475 golf gloves, the unit price is 2.75, the total price is 1306.25

 
The unit price decreases with the number of gloves ordered, based on this table:

< 100              3.00

101 – 500       2.75

501 – 1000    2.50

> 1000            2.25

Be sure to show output from each range, as well as your code.

 

Portfolio Program #3 (from ch.04)

Write a program that prints a “countdown,” starting at a count (of 10 or more) which is input from the keyboard, and which ends by printing “Blast Off!” when the count reaches zero.  (Be sure it prints out each countdown number, too)

Last-minute addition:  If the user inputs a number lower than 10, be sure the program continues to run, requesting the user to "Try Again."


Portfolio Program #4 (from ch.06,07)

Modify the golf glove program from ch.03, portfolio program #2

***Be sure to keep the original as part of your portfolio, too!***

 Use a function or a subroutine to calculate the correct price

 Modify the output to look something like this:

Number of golf gloves ordered:

475

 

 

The unit price is:

2.75

 

 

The total price for your order is:

1306.25

 

 

 

 

 

 

If you order more gloves, you will receive a lower price per unit!

 
Be sure to format your numbers appropriately.

 If the order is for fewer than 1000 gloves, add a line at the bottom:

If you order more gloves, you will receive a lower price per unit!

If the order is for 1000 gloves or more, add a line at the bottom:

You are getting the best price by ordering so many gloves!

 Your printed output should include a value from each price range.


Portfolio Program #5 (from ch.08)

Modifying program 8b, change the keyboard input from a player’s name to a team name.  When the user types in a team number (1-5), the list of all players on that team should display, along with the team name.

Your output should include all five teams, with the respective players listed.


Portfolio Program #6 


This program uses DATA02.txt

(item number, description, qty, category, warehouse, price, cost)

Create an interactive program that asks a user to input a warehouse number.  The output will include only the items in that warehouse, and should look something like this:

 

Merchandise in Warehouse #1

Item #

Description

Qty

=======

==============

===

CD52

Microwave Oven

32

KL62

Dryer

12

 

 

 

Total items in warehouse

44

 

After showing the output for one warehouse, the program should prompt the user for another warehouse number.

For the portfolio, provide the output from each of the three warehouses.


Portfolio Program #7 

This program uses DATA02.txt

(item number, description, qty, category, warehouse, price, cost)

Profit = (price-cost)*qty

This program will read in DATA02.txt, calculate the profit on each item, then sort the output two ways:

  1. Sort by Qty, descending     (identify that this output is by quantity)
  2. Sort by Profit, descending   (identify that this output is by profit)

 The output fields should be:

Item number, description, qty, cost, price, profit