Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialBryony Stewart
1,230 PointsAm I missing the point?
Has anyone got any tips on how to deal with dyslexia and learning programming languages? I get really bad writers block when I am asked to code something. And don't know what tools to use for the job, e.g. (lists,functions,args,strings,floats.)
def loopy(items):
# Code goes here
for items in items:
print (items)
if items == "STOP"
break
1 Answer
Steven Parker
231,248 PointsYou have a few issues here:
- the if statement needs a colon at the end
- the if and the break must both come before the print to prevent the "STOP" from showing
- while it may work here, it will generally be a good idea to use a different name for the iterating variable
- the iterating variable is often named using the singular version of the variable with the collection
I don't know much about dyslexia, but I can say that I have given similar hints to many students, almost certainly including those who do not have that challenge.