09-30-2013

posted Sep 30, 2013, 5:39 AM by Samuel Konstantinovich   [ updated Sep 30, 2013, 5:39 AM ]
Go over HW.
Discuss HW server + Deadline.
Mention Exam.

Do Now:

On Paper, write a Scheme function numRoots that accepts 3 integer coefficients of a quadratic and returns the number of real roots. Remember the discriminant determines the number of roots.
Discriminant        Number of real roots
  d>0                    2
  d=0                    1
  d<0                    0

Examples:
(numRoots 1 0 -1)  -> 2
(numRoots 1 0 1) -> 0
(numRoots 1 2 1) -> 1


Comments