In Class: Week 5


Create a week05 subdirectory in your cs21/class directory:

      % cd 
      % cd cs21/class
      % pwd
        /home/your_user_name/cs21/class

      % mkdir week05        
	
Then, from within your week05 subdirectory copy over some python files from my public directory:
    % cd week05
    % pwd
      /home/your_user_name/cs21/class/week05

    % cp ~newhall/public/cs21/week05/* .
    % ls
	

We are going to do some of the following together in class:
  1. open simplefunc.py in vim. We will look over the code which contains calls to two simple functions. Once we think we understand what it is doing, lets try running it.

  2. open factorial.py. We will look over the code together. This is an example of a function that takes input (it has parameters and the function call contains argument values for the parameters) and an example of a function that returns a value to the caller.

  3. open squares.py. Together we are going to write a function square_the_biggest that takes two input values and returns the square of the larger of the two values. Let's make sure to test it for different input values to be sure it is correct.

  4. open draw_shapes.py. We are going to write some functions together.