For this lab, you will use the Idle development environment and save your programs as .py files. Submit your completed labs in the drop box below this. All of your submitted programs in this class should include a comment block with your name, the class, and the date.

1. Write a Python program that will prompt a user for the size of their (round) pizza and will output the number of square inches in the pizza. (This is exercise 8 at the end of Ch. 2 of our text.)

2. The formula for computing the final amount if one is earning compound interest is given on Wikipedia as

A = P (1 + r/n)nt

Write a Python program that assigns the principal amount of 10000 to variable P, assign to n the value 12, and assign to r the interest rate of 8% (0.08). Then have the program prompt the user for the number of years, t, that the money will be compounded for. Calculate and print the final amount after t years. 

(This is exercise 7 at the end of Ch. 2 of our text.)

Last modified: Monday, September 23, 2019, 1:32 PM