In Class: Week 2 Monday
Create a week02 subdirectory in your cs21/class directory:
% cd
% cd cs21/class
% pwd
/home/your_user_name/cs21/class
% mkdir week02
Then, from within your week02 subdirectory copy over some python files
from my public directory:
% cd week02
% pwd
/home/your_user_name/cs21/class/week02
% cp ~newhall/public/cs21/week02/* .
% ls
We are going to do some of the following:
- open expr.py in vim. It contains some examples of
numeric expressions and order of evalution. Let's take a look
at some of them...
- Together we are going to write a program that computes
the average of 5 integer values that are entered by a user.
- open test_math.py in vim. We will try out functions from
math library.
- open test_string.py. Together we will try writing some code using
string operators (concatenation (+), repetition (*), split ([pos1:pos2])
- If we have time: open format.py in vim. It contains some examples of formated
output. We will look at formating output at some point this semester.
If we do not get to it this week and you are interested in it, look at the
examples in this file.