-
Notifications
You must be signed in to change notification settings - Fork 18
/
index.html
565 lines (482 loc) · 24.6 KB
/
index.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="shortcut icon" href="../../img/favicon.ico">
<title>2. Programming in Python - the basics - Computational Thinking - Laboratory</title>
<link href="../../css/bootstrap.min.css" rel="stylesheet">
<link href="../../css/font-awesome.min.css" rel="stylesheet">
<link href="../../css/base.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css">
<link href="../../extra.css" rel="stylesheet">
<script src="../../js/jquery-1.10.2.min.js" defer></script>
<script src="../../js/bootstrap.min.js" defer></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body>
<div class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand" href="../..">Computational Thinking - Laboratory</a>
<!-- Expander button -->
<button type="button" class="navbar-toggler" data-toggle="collapse" data-target="#navbar-collapse">
<span class="navbar-toggler-icon"></span>
</button>
<!-- Expanded navigation -->
<div id="navbar-collapse" class="navbar-collapse collapse">
<!-- Main navigation -->
<ul class="nav navbar-nav">
<li class="navitem">
<a href="../.." class="nav-link">Home</a>
</li>
<li class="dropdown active">
<a href="#" class="nav-link dropdown-toggle" data-toggle="dropdown">Chapters <b class="caret"></b></a>
<ul class="dropdown-menu">
<li>
<a href="../01/" class="dropdown-item">1. Getting started with Python</a>
</li>
<li>
<a href="./" class="dropdown-item active">2. Programming in Python - the basics</a>
</li>
<li>
<a href="../03/" class="dropdown-item">3. Working with lists and tuples</a>
</li>
<li>
<a href="../04/" class="dropdown-item">4. Working with unordered structures</a>
</li>
<li>
<a href="../05/" class="dropdown-item">5. Recursion and working with files</a>
</li>
<li>
<a href="../06/" class="dropdown-item">6. Data analysis on Netflix shows</a>
</li>
</ul>
</li>
</ul>
<ul class="nav navbar-nav ml-auto">
<li class="nav-item">
<a href="#" class="nav-link" data-toggle="modal" data-target="#mkdocs_search_modal">
<i class="fa fa-search"></i> Search
</a>
</li>
<li class="nav-item">
<a rel="prev" href="../01/" class="nav-link">
<i class="fa fa-arrow-left"></i> Previous
</a>
</li>
<li class="nav-item">
<a rel="next" href="../03/" class="nav-link">
Next <i class="fa fa-arrow-right"></i>
</a>
</li>
<li class="nav-item">
<a href="https://github.com/comp-think/comp-think.github.io" class="nav-link"><i class="fa fa-github"></i> GitHub</a>
</li>
</ul>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-3"><div class="navbar-light navbar-expand-md bs-sidebar hidden-print affix" role="complementary">
<div class="navbar-header">
<button type="button" class="navbar-toggler collapsed" data-toggle="collapse" data-target="#toc-collapse" title="Table of Contents">
<span class="fa fa-angle-down"></span>
</button>
</div>
<div id="toc-collapse" class="navbar-collapse collapse card bg-secondary">
<ul class="nav flex-column">
<li class="nav-item" data-level="1"><a href="#programming-in-python-the-basics" class="nav-link">Programming in Python - the basics</a>
<ul class="nav flex-column">
<li class="nav-item" data-level="2"><a href="#syntax-in-python" class="nav-link">Syntax in Python</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#operators" class="nav-link">Operators</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#conditional-statement" class="nav-link">Conditional statement</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#functions" class="nav-link">Functions</a>
<ul class="nav flex-column">
</ul>
</li>
<li class="nav-item" data-level="2"><a href="#exercises" class="nav-link">Exercises</a>
<ul class="nav flex-column">
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div></div>
<div class="col-md-9" role="main">
<h1 id="programming-in-python-the-basics">Programming in Python - the basics</h1>
<h2 id="syntax-in-python">Syntax in Python</h2>
<h3 id="variables">Variables</h3>
<p><strong>Some general considerations</strong></p>
<ul>
<li>In Python, a variable is created when you first assign a value to it</li>
</ul>
<pre><code class="py">planet = 'Jupiter'
</code></pre>
<ul>
<li>The name of a variable cannot start with a digit or contain a special symbol (e.g., <code>|£$%@#</code>)</li>
<li>Some keywords cannot be used for naming variables.</li>
</ul>
<pre><code class="py">False | class | finally | is | return | None | continue | for | lambda | try | True | def
from | nonlocal | while | and | del | global | not | with | as | elif | if | or
yield | assert | else | import | pass | break | except | in | raise
</code></pre>
<ul>
<li>Python is case-sensitive: <code>planet</code> and <code>Planet</code> are different variables</li>
</ul>
<p><strong>Naming conventions</strong></p>
<p>The following naming styles are commonly distinguished:</p>
<ul>
<li>snake case: lower_case_with_underscores</li>
<li>CamelCase: CapitalizedWords</li>
<li>mixedCase: differs from CamelCase by initial lowercase character
<img src="../img/naming_convention.png"> </li>
</ul>
<p><strong>Python naming convention</strong></p>
<p>The <a href="https://peps.python.org/pep-0008/#naming-conventions" target="_blank" alt="pep-8 and Python naming conventions">Python Enhancement Proposal number 8 (PEP 8)</a> states:
<div class="note">
Function names should be lowercase, with words separated by underscores as necessary to improve readability. Variable names follow the same convention as function names.
</div></p>
<p>Use names that make sense: <code>planet = 'Jupiter'</code> rather than <code>p = 'Jupiter'</code></p>
<h3 id="punctuation-and-indentation">Punctuation and indentation</h3>
<p>You don't need to add punctuation at the end of lines</p>
<pre><code class="py">planet = 'Jupiter'
position_from_sun = 5
</code></pre>
<p>Use semicolons in case you want to put multiple statements in a single line</p>
<pre><code class="py">planet = 'Jupiter' ; position_from_sun = 5
</code></pre>
<p>Document your code using comments</p>
<pre><code class="py"># this is the first comment
planet = 'Jupiter' # and this is the second comment
# ... and now a third!
text = "# This is not a comment because it's inside quotes."
</code></pre>
<h3 id="data-types">Data types</h3>
<h4>Numbers</h4>
<pre><code class="py"># Integers
known_satellites = 80
# Floating point numbers
hydrogen_percentage = 0.89
</code></pre>
<p>The <code>int()</code> and <code>float()</code> methods convert booleans, numbers and number-like strings to integers and floating point numbers</p>
<pre><code class="py">known_satellites = int('80')
# 80
the_world_is_flat = float(True)
# 1.0
the_world_is_flat = float(False)
# 0.0
</code></pre>
<h4>Strings</h4>
<pre><code class="py">planet = 'Jupiter' # This is a string
</code></pre>
<p>The <code>str()</code> method returns the string representation of a given object</p>
<pre><code class="py">known_satellites = str(80)
# Use the type() function to return the type of the object
print(type(known_satellites))
# <class 'str'>
</code></pre>
<h4>Lists</h4>
<pre><code class="py"># You can initialise an empty list with the list() method
planets = list()
# Or using square brackets
planets = []
# To fill the list, you can put the items separated by commas between square brackets
planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus']
# In Python you count from zero
print(planets[4]) # Jupiter
# To sort the list
planets_sorted_alphabetically = sorted(planets)
# planets = ['Earth', 'Jupiter', 'Mars', 'Mercury', 'Saturn', 'Uranus', 'Venus']
# Add a new item to the list
planets.append('Neptune')
# planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune']
# Count how many elements we have in a list
planets_count = len(planets) # 8
</code></pre>
<h3 id="string-interpolation">String interpolation</h3>
<p><em>String interpolation</em> is the process of substituting values of variables into placeholders in a string</p>
<pre><code class="py">print("The fifth planet is %s" %(planets[4]))
print("The fifth planet is {}".format(planets[4]))
print(f"The fifth planet is {planets[4]}")
# The fifth planet is Jupiter
</code></pre>
<h2 id="operators">Operators</h2>
<h4>Arithmetic operators</h4>
<pre><code class="py">x = 5
y = 2
# + Add two operands
print(x + y) # 7
# - Subtract the right operand from the left one
print(x - y) # 3
# * Multiply two operands
print(x * y) # 10
# / Divide the left operand by the right one. Division always returns a floating point number
print(x / y) # 2.5
# ** Raise the left operand to the power of the right one
print(x ** y) # 25
# % Return the remainder of the division. It is called modulus
print(x % y) # 1
# // Discard the fractional part of the division's result. It is called floor division
print(x // y) # 2
</code></pre>
<h4>Comparison operators</h4>
<pre><code class="py">x = 5
y = 2
# > Greater than - True if the left operand is greater than the right one
print(x > y) # True
# < Less than - True if the left operand is less than the right one
print(x < y) # False
# == Equal to - True if both operands are equal
print(x == y) # False
# != Not equal to - True if operands are not equal
print(x != y) # True
# >= Greater than or equal to - True if the left operand is greater than or equal to the right one
print(x >= y) # True
# <= Less than or equal to - True if the left operand is less than or equal to the right one
print(x <= y) # False
</code></pre>
<div class="note">
<strong>Note the difference</strong>: <code>=</code> is an assignment operator, used to assign a value to a variable. Conversely, <code>==</code> is a Boolean operator that checks whether the right operand is equal to the left one
</div>
<h4>Logic operators</h4>
<pre><code class="py">x = True
y = False
# "and": True if both the operands are true
print(x and y) # False
# "or": True if at least one of the operands is true
print(x or y) # True
# "not": True if the operand is False and viceversa
print(not x) # False
</code></pre>
<h4>Assignment operators</h4>
<pre><code class="py"># with "="
x = 5
print(x)
# with "+="
x += 5 # A shortcut for x = x + 5
print(x)
# with "-="
x -= 2 # A shortcut for x = x - 2
print(x)
# Try with other arithmetic operands ...
</code></pre>
<h4>Membership operators</h4>
<pre><code class="py">planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus']
# "in": True if value/variable is found in the sequence
print('Pluto' in planets) # False
# "not in": True if value/variable is not found in the sequence
print('Moon' not in planets) # True
</code></pre>
<h2 id="conditional-statement">Conditional statement</h2>
<p>A decision might be taken only when a specific condition is satisfied</p>
<pre><code class="py">the_world_is_flat = True
if the_world_is_flat:
print("Be careful not to fall off!")
</code></pre>
<p>Use indentation to separate <strong>code blocks</strong> by pressing the <img src="../img/tab_key.png" height="50"> key. </p>
<p>A block is a piece of Python program text that is executed as a unit, i.e., a conditional statement or a function body</p>
<h2 id="functions">Functions</h2>
<p>A block of code which defines a specific algorithm and runs only when it is called</p>
<pre><code class="py"># def {func_name}({parameter_1}, {parameter_2}, ...):
# {func_body}
def add(num1, num2):
return num1 + num2
my_sum = add(5,4)
print(my_sum) # 9
</code></pre>
<h2 id="exercises">Exercises</h2>
<h3 id="1st-exercise">1st Exercise</h3>
<p>The function <code>is_friend_of_harry()</code> returns a <em>True</em> value if a given name (i.e. type string) is one of the friends of Harry Potter, otherwise the function returns <em>False</em>. Let's pretend the friends of Harry Potter are: <em>"Ron", "Hermione", "Hagrid",</em> and <em>"Dumbledore"</em>. </p>
<p><strong>Example:</strong> calling the function <code>is_friend_of_harry("Malfoy")</code> returns <em>False</em>.</p>
<p><span class="ex-part"> <strong>1.a)</strong> Define the function <code>is_friend_of_harry()</code>, and call it for each one of the following characters: <em>"Hagrid", "Voldemort",</em> and <em>"Bellatrix"</em>. Print the result (i.e. <em>True/False</em>) of each call. </span></p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_1')">Show solution</button>
<div class="solution-code" id="sol_1"></p>
<pre><code class="py">def is_friend_of_harry(name):
friends_list = ["Ron", "Hermione", "Hagrid", "Dumbledore"]
if name in friends_list:
return True
else:
return False
print(is_friend_of_harry("Hagrid"))
print(is_friend_of_harry("Voldemort"))
print(is_friend_of_harry("Bellatrix"))
</code></pre>
</div>
<p><span class="ex-part"> <strong>1.b)</strong> Write a portion of code that prints <em>"Harry has friends!"</em> if at least one of the previous characters is a friend of Harry, otherwise, print <em>"Harry has no friends!"</em>. </span></p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_2')">Show solution</button>
<div class="solution-code" id="sol_2"></p>
<pre><code class="py">is_hagrid_friend = is_friend_of_harry("Hagrid")
is_voldemort_friend = is_friend_of_harry("Voldemort")
is_bellatrix_friend = is_friend_of_harry("Bellatrix")
if is_hagrid_friend or is_voldemort_friend or is_bellatrix_friend:
print("Harry has friends!")
else:
print("Harry has no friends!!")
</code></pre>
</div>
<p><span class="ex-part"> <strong>1.c)</strong> Let's make our function <code>is_friend_of_harry()</code> a bit more powerful. The new function should work the same way even if the given name is not well written, such that it should handle these cases:</p>
<ul>
<li>a) The letters of the name are written in different formats: uppercase and lowercase (e.g. "ron", "RON", "Ron", "roN")</li>
<li>b) The name includes spaces (e.g. "Ron ", " Ron")</li>
<li>c) The name has both (a) and (b) cases combined in it (e.g. " roN")</li>
</ul>
<p><strong>Hint:</strong> in python <code>{string}.lower()</code> transforms a string to its lowercase form; <code>{string}.strip()</code> removes the starting and ending whitespaces (if any); and <code>{string}.capitalize()</code> capitalizes the first letter of a string </span></p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_3')">Show solution</button>
<div class="solution-code" id="sol_3"></p>
<pre><code class="py">def is_friend_of_harry(name):
friends_list = ["Ron", "Hermione", "Hagrid", "Dumbledore"]
name = name.lower()
name = name.strip()
name = name.capitalize()
if name in friends_list:
return True
else:
return False
</code></pre>
</div>
<p><span class="ex-part"> <strong>1.d)</strong> Define another function <code>is_prof_friend_of_harry()</code> which returns a <em>True</em> value if a given name, which might be written in any format described (1.c), is a professor and a friend of Harry, otherwise the function must return <em>False</em>. The function should call the improved version of the function <code>is_friend_of_harry()</code> in its code (i.e. defined in (1.c)). Let's pretend the professors of Harry Potter are: <em>"Snape", "Umbridge", and "Hagrid"</em>.</span></p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_4')">Show solution</button>
<div class="solution-code" id="sol_4"></p>
<pre><code class="py">def is_prof_friend_of_harry(name):
prof_list = ["Snape", "Umbridge", "Hagrid"]
name = name.lower()
name = name.strip()
name = name.capitalize()
if name in prof_list and is_friend_of_harry(name):
return True
else:
return False
print(is_prof_friend_of_harry("snape"))
print(is_prof_friend_of_harry(" umbridge "))
print(is_prof_friend_of_harry(" hagrid"))
</code></pre>
</div>
<h3 id="2nd-exercise">2nd Exercise</h3>
<p>Each house of Hogwarts has a score which is updated with the addition or subtraction of points based on the behaviour of the houses' members, e.g. after a rule violation. We have two lists: </p>
<ul>
<li>the houses of Hogwarts <code class="py">houses = ["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"]</code></li>
<li>the score of each house <code class="py">scores = [0,0,0,0]</code>. The score of a house in position <em>n</em> in <code>houses</code> is placed in the same position <em>n</em> in <code>scores</code>.</li>
</ul>
<p><strong>2.a)</strong> Define the function <code>update_house_score()</code> which increments/decrements the score of a specific house with a given value of points. The function takes three parameters: <code>house_name</code>, <code>action</code>, and <code>points</code>. The value of <code>action</code> is a string which is either <em>"+"</em>(points will be added) or <em>"-"</em> (points will be subtracted)<br />
<strong>Example:</strong> Calling the function this way: <code class="py">update_house_score("Gryffindor", "+", 5)</code> should increment the score of house Gryffindor by 5 points.<br />
<strong>Hint:</strong> The function <code class="py">{list}.index({value})</code> returns the index of an element in the list, e.g. <code class="py">houses.index("Hufflepuff")</code> returns the value <em>1</em></p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_5')">Show solution</button>
<div class="solution-code" id="sol_5"></p>
<pre><code class="py">houses = ["Gryffindor", "Hufflepuff", "Ravenclaw", "Slytherin"]
scores = [0,0,0,0]
def update_house_score(house_name, action, points):
house_index = houses.index(house_name)
if action == "+":
scores[house_index] += points
else:
scores[house_index] -= points
</code></pre>
</div>
<p><strong>2.b)</strong> After the Quidditch cup the Houses have increased/decreased their scores: +10 Gryffindor, +7 Hufflepuff, -3 Slytherin. After the end of the game a member of house "Slytherin" helped a man riding his broom, so his house gained back 5 points. Call the function <code>update_house_score()</code> for each action in order to update the houses points and print the two lists: <code>houses</code> and <code>scores</code>.</p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_6')">Show solution</button>
<div class="solution-code" id="sol_6"></p>
<pre><code class="py">update_house_score("Gryffindor", "+", 10)
update_house_score("Hufflepuff", "+", 7)
update_house_score("Slytherin", "-", 3)
update_house_score("Slytherin", "+", 5)
print(houses)
print(scores)
</code></pre>
</div>
<p><strong>2.c)</strong> redefine <code>update_house_score()</code> using the function <code>eval()</code> (<a href="https://docs.python.org/3/library/functions.html#eval">https://docs.python.org/3/library/functions.html#eval</a>)</p>
<p><button class="toggle-solution btn btn-light" onclick="toggle_click(this,'sol_2_2c')">Show solution</button>
<div class="solution-code" id="sol_2_2c"></p>
<pre><code class="py">def update_house_score(house_name, action, points):
house_index = houses.index(house_name)
scores[house_index] = eval(str(points) + action + str(scores[house_index]))
return scores
</code></pre>
</div></div>
</div>
</div>
<footer class="col-md-12">
<hr>
<p>Documentation built with <a href="https://www.mkdocs.org/">MkDocs</a>.</p>
</footer>
<script>
var base_url = "../..",
shortcuts = {"help": 191, "next": 78, "previous": 80, "search": 83};
</script>
<script src="../../js/base.js" defer></script>
<script src="../../extra.js" defer></script>
<script src="../../search/main.js" defer></script>
<div class="modal" id="mkdocs_search_modal" tabindex="-1" role="dialog" aria-labelledby="searchModalLabel" aria-hidden="true">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="searchModalLabel">Search</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<p>From here you can search these documents. Enter your search terms below.</p>
<form>
<div class="form-group">
<input type="search" class="form-control" placeholder="Search..." id="mkdocs-search-query" title="Type search term here">
</div>
</form>
<div id="mkdocs-search-results" data-no-results-text="No results found"></div>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div><div class="modal" id="mkdocs_keyboard_modal" tabindex="-1" role="dialog" aria-labelledby="keyboardModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title" id="keyboardModalLabel">Keyboard Shortcuts</h4>
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
</div>
<div class="modal-body">
<table class="table">
<thead>
<tr>
<th style="width: 20%;">Keys</th>
<th>Action</th>
</tr>
</thead>
<tbody>
<tr>
<td class="help shortcut"><kbd>?</kbd></td>
<td>Open this help</td>
</tr>
<tr>
<td class="next shortcut"><kbd>n</kbd></td>
<td>Next page</td>
</tr>
<tr>
<td class="prev shortcut"><kbd>p</kbd></td>
<td>Previous page</td>
</tr>
<tr>
<td class="search shortcut"><kbd>s</kbd></td>
<td>Search</td>
</tr>
</tbody>
</table>
</div>
<div class="modal-footer">
</div>
</div>
</div>
</div>
</body>
</html>