**EXERCISES Unit 3 Conditional Statements**

In Python do the following

**1. Write a program that accepts an integer and determines if the number 3 divides the number evenly. ( use mod)**

**Example 1:**

Enter an Integer: __9__

3 divides 9 evenly

**Example 2:**

Enter an Integer: __14__

3 does not divide 14 evenly

**2) Write a program that excepts a numeric grade from the keyboard and determines if the the grade is passing or failing. 60% or higher is passsing.**

Enter your grade percentage: __77.9__

You pass

Enter your grade percentage: __50__

You fail

**3) Write a program that excepts two integer values and determines which number is the smallest**

Enter an integer:__8__

Enter another integer:__5__

5 is the smallest

Enter an integer:__10__

Enter another integer:1__5__

10 is the smallest

**4) Write a program that excepts a letter grade from the keyboard and determines if the the grade is passing or failing. A,B,C or D is passsing, F or E. is failing. All other letters are invalid grades.**

Enter your grade letter: __C__

You pass

Enter your grade letter: __F__

You Fail

Enter your grade letter:__M__

Invalid Grade

**5. Quicky Overnite Delivery Service accepts no package heavier than
60 pounds, or larger than 4 cubic feet. Write a program that uses as input the
weight of a package in pounds and its dimensions in feet. The program should
determine if the package meets the requirements and display an appropriate
message (e.g., too large, too heavy or both):**

Enter
weight of package in pounds: __62 __

Enter
length of package in feet: __1 __

Enter
width of package in feet: __2 __

Enter
height of package in feet: __3__

Package is too large and too heavy

**6. The Cluck Egg
Company has different prices for their eggs, based upon the number sold:**

0 up to but not including 4 dozen $0.50 per dozen

4 up to but not including 6 dozen $0.45 per dozen

6 up to but not including 11 dozen $0.40 per dozen

11 or more dozen $0.35 per dozen

** Extra eggs are priced at 1/12 the
per dozen price each.**

**Write a program that allows the user to input
the number of eggs wanted, and then calculates the bill:**

Enter
number of eggs: __126__

Purchase: 10 dozen and 6 extra eggs

Your bill comes to $ 4.20

**8. a) Pop's
Place pays its employees time and a half for every hour worked over 40 hours.
Write a program to calculate weekly **wages **given the hours worked and the
hourly rate:**

Enter
hours worked: __45__

Enter
hourly rate: __10.00__

Wages earned = $ 475.00

**b) Pop employs students who are exempt from taxes
and others who are not. Rewrite your program so that if an employee is not
exempt, 18% will be deducted from the weekly wage, otherwise "NO TAXES
DEDUCTED" will be printed:**

Enter
hours worked: __45__

Enter hourly rate: __10.00__

Exempt (Y/N)? Y

Wages earned $ 475.00

NO TAXES DEDUCTED

Enter hours worked: __20__

Enter hourly rate: 4.00

Exempt (Y/N)? N

Wages earned $ 80.00

Taxes deducted = $ 14.40

Wages after taxes = $ 65.60

**9. What Kind of Triangle, Triangle Side**

**Write a program that excepts the 3 lengths of the sides of a triangle. **

**Use four If-Then statements with the appropriate conditions to determine and print **

a) None :if it fails the triangle inequality.

b) scalene if all side lenghts are different.

c) Isosceles if two sides are equal

d) Equilateral if three sides are equal