GCTAA Logo

Governor's Career & Technical Academy Arlington

Introduction to Computer Science: Week 10


Overview

Our goal this week will be to bring closure to the Polyonial project. We have three class periods to do it, so with focus and dedication, we should be able to add and multiply polynomials by week's end.

Wednesday, March 11th

I'm out sick today. Continue to work on your assignment and we be ready to present your progress on Friday in class.

Monday, March 9th

Classwork

We will begin with presentations of solutions to the function assigned last Thursday to extract terms from a string representing a polynomial.

Homework

You will be provided with __init__ and __str__ methods for a Polynomial class that enable you to read and write polynomials.

Consider the following four ways to store polynomial data for the polynomial represented by the string 3x^4 - 7x^2 + 11:

  1. [(3, 4), (-7, 2), (11, 0)]
  2. (3, 0, -7, 0, 11)
  3. (11, 0, -7, 0, 3)
  4. {4: 3, 2: -7, 0: 11}

Work with your partner to prepare a presentation for class on Wednesday addressing the following questions:

  1. Which representation would make it easier to add polynomials?
  2. Which representation would make it easier to multiply polynomials?
  3. How hard would it be to convert from one representation to the other?

Resources

Evaluation

You will be evaluated based on your solution to this problem and the presentation of it you provide in class on Wednesday.