IB Computer Science Year 2 Higher Level - August 28 2018 Lesson Notes: Difference between revisions
Mr. MacKenty (talk | contribs) (Created page with " __NOTOC__ <table cellspacing="10" style="width:100%;"> <tr> <td style="width:50%; margin:0; margin-top:10px; margin-right:10px; border:1px solid #dfdfdf; padding:0 1em 1em 1...") |
Mr. MacKenty (talk | contribs) |
||
Line 17: | Line 17: | ||
* Work on diagraming with [[UML]] | * Work on diagraming with [[UML]] | ||
* Read some code | * Read some code | ||
<syntaxhighlight lang="python"> | |||
import random | |||
grid = [] | |||
# let's make our map.We assume a 25 x 25 map | |||
for i in range(0,625): | |||
grid.append(random.randrange(1,4)) | |||
def draw_board(): | |||
row = 0 | |||
for i in range(0,625): | |||
print(str(i).zfill(3),end="") | |||
row = row + 1 | |||
if row == 25: | |||
print ("\n") | |||
row = 0 | |||
return | |||
draw_board() | |||
</syntaxghighlight> | |||
* Work on due dates for IA | * Work on due dates for IA | ||
Revision as of 14:13, 27 August 2018
|
|
|
|
|
|
|