-
Notifications
You must be signed in to change notification settings - Fork 3
/
step_2.html
49 lines (49 loc) · 1.12 KB
/
step_2.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta
name="viewport"
content="width=device-width, initial-scale=1.0, user-scalable=yes"
/>
<title>step_2</title>
<style type="text/css">
code {
white-space: pre-wrap;
}
span.smallcaps {
font-variant: small-caps;
}
span.underline {
text-decoration: underline;
}
div.column {
display: inline-block;
vertical-align: top;
width: 50%;
}
</style>
</head>
<body>
<h2
id="step-2-create-a-variable-which-is-a-whole-number-compute-the-square-and-cube-of-it"
>
Step 2: Create a variable which is a whole number, compute the square and
cube of it
</h2>
<pre><code>>>> num = 4
>>> sqr = num * num
>>> sqr
16
>>> cube = num * num * num
>>> cube
64
>>> # A better way to do this
>>> num ** 2
16
>>> num ** 3
64
>>></code></pre>
</body>
</html>