Alice Community  

Go Back   Alice Community > Alice 2 > How do I...?

Reply
 
Thread Tools Display Modes
Chapter 10, Exercise 8
Old
tgarner
Junior Member
 
Status: Offline
Posts: 1
Join Date: Mar 2013
Question Chapter 10, Exercise 8 - 03-23-2013, 08:26 PM

I really have no idea how to do this...does anyone else know
   
Reply With Quote
Scary math stuff.
Old
chickentree
Super Moderator
 
Status: Offline
Posts: 250
Join Date: Dec 2012
Location: Frosno, Ca
Default Scary math stuff. - 03-26-2013, 08:46 AM

Quote:
Originally Posted by tgarner View Post
I really have no idea how to do this...does anyone else know
The first suggestion I would usually give is to find out what you don't understand and then research it until you do. In this case the problem doesn't give you much to go on. If you have not been exposed to the quadratic equation you would rightly be at a lost.
Fear not, little understanding of the quadratic equation is necessary for our purposes and Alice has to do the math!
If you look at the Discriminant Wiki it will tell you all you need to know in the first couple of paragraphs. The discriminant is the stuff under the square root sign "b^2 - 4ac" where b^2 is b squared or b * b. and there are three cases:
  1. The result is positive - there are two answers.
  2. The result is zero - There is one answer.
  3. The result is negative - There are no answers.
This means YOUR problem boils down to:
  1. Get three numbers from the user.
  2. Use the numbers to determine the discrimant, using the formula above.
  3. Test the discriminant to see how many answers there are.
  4. Use the qudratic formula to compute the answers, if needed.
  5. Have the mad scientist say the answer.

Hope this is enough to get you going and good luck
Mark
   
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2019, Carnegie Mellon University
Alice 2.x 1999-2012, Alice 3.x 2008-2012, Carnegie Mellon University. All rights reserved.