Difference between revisions of "IB Computer Science I"

From WLCS
(Wednesday (11/6/08))
Line 27: Line 27:
 
* Formula Fun Assignment
 
* Formula Fun Assignment
 
** Copy your functions from the Chapter 5 assignment
 
** Copy your functions from the Chapter 5 assignment
** If the user inputs 'h' then, you should prompt the user for x1, x2, y1, and y2.  Calculate the hypotenuse by calling the hypotenuse function, and print out the result that is returned.
+
** If the user inputs 'h' then, you should prompt the user for a, b, and c.  Calculate the hypotenuse by calling the hypotenuse function, and print out the result that is returned.
 
** You should do the same for all of the menu's choices.
 
** You should do the same for all of the menu's choices.
 
** If the user does not enter a valid choice, then tell them "INVALID CHOICE" and repeat the menu again
 
** If the user does not enter a valid choice, then tell them "INVALID CHOICE" and repeat the menu again

Revision as of 15:23, 6 November 2008

Welcome to the IB Computer Science I Homepage!

Wednesday (11/6/08)

Warmup:

  • Print out a menu that looks like the following:
Welcome to the Formula Fun Menu!

Calculate...
(h)ypotenuse
(s)lope
(i)ntercept
(f)actor
(m)ultiple
f(a)hrenheit to celsius
(c)elsius to fahrenheit

What would you like to do? (Please choose an option from the above and press Enter...) 
  • Prompt the user for input that corresponds to the above menu
  • Check if the user inputs 'h', and if they do, then print out "...calculating hypotenuse"

Agenda:

  • Repeated menus
  • Formula Fun Assignment
    • Copy your functions from the Chapter 5 assignment
    • If the user inputs 'h' then, you should prompt the user for a, b, and c. Calculate the hypotenuse by calling the hypotenuse function, and print out the result that is returned.
    • You should do the same for all of the menu's choices.
    • If the user does not enter a valid choice, then tell them "INVALID CHOICE" and repeat the menu again

Monday (11/3/08)

  • Return and go over 1st Quarter Exam
  • Complete Chapter 6 exercises - # 5 - 9 today

Archives