Download (right-click, save target as ...) this page as a jupyterlab notebook from:

Laboratory 2 - HW


Laboratory 2: First Steps ...

LAST NAME, FIRST NAME

R00000000

ENGR 1330 Laboratory 2 - Homework

Notice the code cell below! From this notebook forward please include and run the script in the cell, it will help in debugging a notebook. Its ok if the code makes no sense right now - mostly the cell executes system commands. As you change machines, and rerun the cell the output will change (its supposed to!)

Exercise 1

The cell below is type RAW, change it into a code cell and activate (suppress the comments) and run the script.

What is the value of area?

Copy your working script below and add necessary code to output the value of area.

Exercise 2

Change the RAW cell below into a Code cell, and run the script (fix any syntax errors)

a. Of the six variables, which are integers?

b. What is the difference (in effect) between x1=1.0 and y1=1.?

c. Examine the division results; Why does z1//z2 return a value of 0?


Exercise 3

Exploring arithmetic. First define three variables a,b, and c.

Then change the cell below to code and run it.

Now using the example in the cell above, exaluate the following expressions in the indicated cells below: