Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed opportunity to talk about indentation in "Programming with Python : Repeating actions with loops" #687

Open
datasolver opened this issue Jul 29, 2019 · 1 comment

Comments

@datasolver
Copy link

@datasolver datasolver commented Jul 29, 2019

One of the key problems I had when I started programming (in python) was with indentation especially with "for loops" and "if statements". I believe most beginners will have the same or similar issues. Therefore, I think this lesson (Programming with Python : Repeating actions with loops) is a golden opportunity to let learners have a feel of what problems they can run into without proper indentation. For example, how will the intended answer be affected if:

This code:

length = 0
for vowel in 'aeiou':
    length = length + 1
print('There are', length, 'vowels')

was written as:

length = 0
for vowel in 'aeiou':
    length = length + 1
    print('There are', length, 'vowels')
@maxim-belkin
Copy link
Contributor

@maxim-belkin maxim-belkin commented Jul 29, 2019

Thanks, Jamiu! You're right and, in fact, you hit a very important issue that we've got in our episode on for loops: indentation is not emphasized enough. The word indent occurs only twice in the episode: once in the body of the lesson, and once in keypoints. I suggest to discuss how to go about this and then... submit pull request(s)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants