Skip to content

Commit bd2a7ef

Browse files
kids work
1 parent 62b7bba commit bd2a7ef

File tree

1 file changed

+220
-0
lines changed

1 file changed

+220
-0
lines changed
Lines changed: 220 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,220 @@
1+
{
2+
"cells": [
3+
{
4+
"cell_type": "markdown",
5+
"metadata": {},
6+
"source": [
7+
"## 1: use ? to get help when you get stuck\n",
8+
"for example abs?\n",
9+
"## 2: try tinkering it to discover"
10+
]
11+
},
12+
{
13+
"cell_type": "code",
14+
"execution_count": 1,
15+
"metadata": {},
16+
"outputs": [
17+
{
18+
"data": {
19+
"text/plain": [
20+
"56"
21+
]
22+
},
23+
"execution_count": 1,
24+
"metadata": {},
25+
"output_type": "execute_result"
26+
}
27+
],
28+
"source": [
29+
"abs(-56)\n",
30+
"##abs only can do one argument not two."
31+
]
32+
},
33+
{
34+
"cell_type": "code",
35+
"execution_count": 2,
36+
"metadata": {},
37+
"outputs": [
38+
{
39+
"name": "stdout",
40+
"output_type": "stream",
41+
"text": [
42+
"character is moving\n"
43+
]
44+
}
45+
],
46+
"source": [
47+
"steps= 56\n",
48+
"if abs(steps) >14:\n",
49+
" print('character is moving')"
50+
]
51+
},
52+
{
53+
"cell_type": "code",
54+
"execution_count": 3,
55+
"metadata": {},
56+
"outputs": [
57+
{
58+
"name": "stdout",
59+
"output_type": "stream",
60+
"text": [
61+
"character is moving\n"
62+
]
63+
}
64+
],
65+
"source": [
66+
"steps = 4\n",
67+
"if steps <8 or steps >8:\n",
68+
" print('character is moving')"
69+
]
70+
},
71+
{
72+
"cell_type": "code",
73+
"execution_count": 4,
74+
"metadata": {
75+
"collapsed": true
76+
},
77+
"outputs": [],
78+
"source": [
79+
"bool?"
80+
]
81+
},
82+
{
83+
"cell_type": "code",
84+
"execution_count": 5,
85+
"metadata": {},
86+
"outputs": [
87+
{
88+
"data": {
89+
"text/plain": [
90+
"True"
91+
]
92+
},
93+
"execution_count": 5,
94+
"metadata": {},
95+
"output_type": "execute_result"
96+
}
97+
],
98+
"source": [
99+
"bool(1)"
100+
]
101+
},
102+
{
103+
"cell_type": "code",
104+
"execution_count": 6,
105+
"metadata": {},
106+
"outputs": [
107+
{
108+
"data": {
109+
"text/plain": [
110+
"True"
111+
]
112+
},
113+
"execution_count": 6,
114+
"metadata": {},
115+
"output_type": "execute_result"
116+
}
117+
],
118+
"source": [
119+
"bool(2)"
120+
]
121+
},
122+
{
123+
"cell_type": "code",
124+
"execution_count": 7,
125+
"metadata": {},
126+
"outputs": [
127+
{
128+
"data": {
129+
"text/plain": [
130+
"True"
131+
]
132+
},
133+
"execution_count": 7,
134+
"metadata": {},
135+
"output_type": "execute_result"
136+
}
137+
],
138+
"source": [
139+
"bool(45)"
140+
]
141+
},
142+
{
143+
"cell_type": "code",
144+
"execution_count": 8,
145+
"metadata": {},
146+
"outputs": [
147+
{
148+
"data": {
149+
"text/plain": [
150+
"False"
151+
]
152+
},
153+
"execution_count": 8,
154+
"metadata": {},
155+
"output_type": "execute_result"
156+
}
157+
],
158+
"source": [
159+
"bool(5>9)"
160+
]
161+
},
162+
{
163+
"cell_type": "code",
164+
"execution_count": 9,
165+
"metadata": {},
166+
"outputs": [
167+
{
168+
"data": {
169+
"text/plain": [
170+
"True"
171+
]
172+
},
173+
"execution_count": 9,
174+
"metadata": {},
175+
"output_type": "execute_result"
176+
}
177+
],
178+
"source": [
179+
"bool(5<8)"
180+
]
181+
},
182+
{
183+
"cell_type": "markdown",
184+
"metadata": {},
185+
"source": [
186+
"### To be continued..."
187+
]
188+
},
189+
{
190+
"cell_type": "code",
191+
"execution_count": null,
192+
"metadata": {
193+
"collapsed": true
194+
},
195+
"outputs": [],
196+
"source": []
197+
}
198+
],
199+
"metadata": {
200+
"kernelspec": {
201+
"display_name": "Python [default]",
202+
"language": "python",
203+
"name": "python3"
204+
},
205+
"language_info": {
206+
"codemirror_mode": {
207+
"name": "ipython",
208+
"version": 3
209+
},
210+
"file_extension": ".py",
211+
"mimetype": "text/x-python",
212+
"name": "python",
213+
"nbconvert_exporter": "python",
214+
"pygments_lexer": "ipython3",
215+
"version": "3.6.3"
216+
}
217+
},
218+
"nbformat": 4,
219+
"nbformat_minor": 2
220+
}

0 commit comments

Comments
 (0)