Created
May 29, 2015 18:25
-
-
Save Sourceless/45099d5a53a6f4cf98a5 to your computer and use it in GitHub Desktop.
UoY CompSci Bar Craw 2015, Code Review
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my_name = # Oh dear, this is a SyntaxError! | |
my_year = # Same here! And these variables are never used! | |
crawl = [ | |
"Glasshouse", | |
"Lowther", | |
"Yates's", | |
"Parish", | |
"Society", | |
"Salvation" | |
] # bars would be a better name but hey ho, it lets you be all poetic below | |
for bar in crawl: | |
# only two spaces indent! Another SyntaxError! | |
if visited(bar): # visited is undefined and you'll get a NameError | |
print(bar + " [X]") # use format strings, also the block if is wasteful | |
else: # if you're only changing the one character | |
print(bar + " [ ]") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment