Exercises
Supply the commands to perform the following tasks
-
Assign 2 to the variable z
Use % to display z + 2
Use % to display z + 12
Use % to display z + 24
Use % to display z + 14
Use % to assign z*(z+14) to xz := 2 % + 2 % + 10 % + 12 % - 10 x := z * %
Comment: Notice the sloppiness of using % for these tasks; it would be a lot easier to simply type z+2, z+12, etc.
-
Bring up the help topic for the "with" command
? with
-
In the same worksheet as exercise 1:
Assign the Pythagorean Theorem (the sum of x squared and y squared equals z squared) to the variableform
Clear the values of x and z
Assign the Pythagorean Theorem (the sum of x squared and y squared equals z squared) to the variableform
Comment: Notice that the first
form
has numerical values for x and z squared but the secondform
is the familiar Theorem that can be used to sub values or manipulated to solve of values of x, y or z. -
Use commands to... Assign 10 to x without displaying the evaluated expression
Assign x divided by Pi to x
Find the decimal value (approximation) of x
x := 10: x := x/Pi evalf(x)