Your programs will have 3 levels of documentation. Give your program an appropriate name.
1. Write a program which will decide if a number is even or odd, positive, negative or 0.
2. To determine whether a year is a leap year, follow these (Are there better algorithms? Sure! Use the one provided( https://support.microsoft.com/en-us/help/214019/method-to-determine-whether-a-year-is-a-leap-year ).) steps:
1. If the year is evenly divisible by 4, go to step 2. Otherwise, go to step 5.
2. If the year is evenly divisible by 100, go to step 3. Otherwise, go to step 4.
3. If the year is evenly divisible by 400, go to step 4. Otherwise, go to step 5.
4. The year is a leap year (it has 366 days).
5. The year is not a leap year (it has 365 days).
3. Determine the astrological sign given the month and day of the person’s birthday:
Aries Mar 21-Apr 19
Taurus Apr 20-May 20
Gemini May 21-Jun 21
Cancer Jun 22-Jul 22
Leo Jul 23-Aug 22
Virgo Aug 23-Sep 22
Libra Sep 23-Oct 23
Scorpio Oct 24-Nov 21
Sagittarius Nov 22-Dec 21
Capricorn Dec 22-Jan 19
Aquarius Jan 20-Feb 18
Pisces Feb 19-Mar 20
4. Credit card application evaluation. Based on the input values, points are obtained. Based on the total points, various actions are taken.
Age
Category Points
< 20 -10
21 - 30 0
31 - 50 20
> 50 25
At Current Address
Category Points
< 1yr -5
1 - 3yrs 5
4 - 8yrs 12
> 8 20
Annual Income
Category Points
< $15000 0
< $25000 12
< $40000 24
> $40000 30
Years at same job
Category Points
< 2yrs -4
2-4 yrs 8
>4yrs 15
Actions
< 20 points no card
21-35 card with $500 limit
36-60 card with $2000 limit
> 60 card with $5000 limit
5. Postage problem. Given the weight of a letter in grams, determine the cost of the postage:
up to 30g = 48¢
up to 50g = 70¢
up to 100g = 90¢
past 100g = 100g cost + 18¢ for each 50g
Summative Evaluation
If you can't see the document, please read: You Do Not Need Permission To View Any Documents.