Write logically-correct, successfully-running programs that accomplish the items that follow. Here are some pointers to keep in mind for the second program:
  1. In your first program (variables.py), do the following:
  2. In your second program (ellipse.py), do the following:

    You have probably seen an ellipse before. (A formal mathematical definition of an ellipse would be beyond the scope of this assignment, but if interested, you may read more at sources such as this one.) It is similar to a circle, only "flattened", such as the ellipse shown below:

    As you can see, it has two axes -- one horizontal and one vertical. In this case, the horizontal axis is the longer of the two. Its center is at the origin of the coordinate plane.

    In this part of the assignment, we start with the ellipse depicted above -- centered at the origin, whose horizontal and vertical axes are 20 and 6 units long, respectively. We could, instead, say that it has horizontal and vertical semi-axes 10 and 3 units long, respectively. Furthermore, we could also say that each point along the ellipse's edge represents an angle Θ, with respect to the positive X-axis. For example, the point [10, 0] would correspond to a zero-degree angle (Θ = 0) from the positive X-axis, the point [0, 3] would correspond to Θ = 90 degrees (or π/2 radians), the point [-10, 0] would correspond to Θ = 180 degrees (or π radians), and so forth. A line -- from the ellipse's center to its edge, drawn at angle Θ -- would represent the radius of the ellipse at Θ

    Write code to compute the radius of our ellipse at Θ = 2.9 radians (not degrees!). You will need float variables to represent the angle Θ, the horizontal semi-axis A, the vertical semi-axis B, and the radius. With those variables, you will write expressions and statements to calculate the radius at Θ:

    a = horizontal semi-axis
    b = vertical semi-axis
    Θ = the angle from the positive X-axis, in radians
    r(Θ) = the radius of the ellipse at angle Θ



    NOTE: sin2Θ and cos2Θ are equivalent to (sin Θ)2 and (cosΘ)2, respectively.

    Use print statements to announce the values of the semi-axes, the angle THETA, and the resulting ellipse radius at angle THETA. For each print statement, use string concatenation with the relevant variables.

    The horizontal semi-axis A is 10.0 units.
    The vertical semi-axis B is 3.0 units.
    The angle THETA is 2.9 radians.
    The radius (at 2.9 radians) is 7.958690332032777 units.
    (As long as your result for radius matches the example above to a few decimal places, do not worry if your result is not an exact match!)
  3. In your third program (interest.py), do the following:

    Write code to compute the compound amount, after a period of time, for a monetary investment that earns interest. Your initial investment is $8000.00.With an interest rate of 6.5% per year and 4 compounding periods per year, how much will yoru investment be after 7 years? You will need variables for the initial investment, interest rate, number of compounding periods in a year, and the time frame.

    t = time, in years
    P = initial investment
    r = interest rate, as a decimal (e.g. for a rate of 7.9%, r = 0.079)
    n = number of interest compounding periods per year
    A(t) = the compounded amount of your investment at time t


    Use print statements to announce the values of the initial investment, the interest rate, the number of compounding periods in a year, the time, and the compound amount (in place of the blank), skipping a line afterward. For each print statement, use string concatenation with the relevant variables.

    The initial investment is 8000.0 dollars.
    The interest rate is 6.5 percent per year.
    There are 4.0 compounding periods in a year.
    The time frame is 7.0 years.
    After that time, you will have 12563.354888333639 dollars.
    (As long as your result for the compound amount matches the example above to a few decimal places, do not worry if your result is not an exact match!)
Questions: In at least 150 words, address the following in your memo.txt file...
  1. How did the process of creating these programs go for you?
  2. What were your main challenges and how did you overcome them?
  3. What did you learn that may be of use as you move along in this class?