Skip to content

Instantly share code, notes, and snippets.

@Sourceless
Created May 29, 2015 18:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sourceless/45099d5a53a6f4cf98a5 to your computer and use it in GitHub Desktop.
Save Sourceless/45099d5a53a6f4cf98a5 to your computer and use it in GitHub Desktop.
UoY CompSci Bar Craw 2015, Code Review
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