RE: Python Tutorial Chapter 2 - More Python 05-17-2013, 01:35 PM
#5
NIce work but I have some suggestions about your tutorial,
1) Your explanation about Functions in Python is not clear and lacks proper examples
2) You've mention under the Commonly used functions as
This might confuse beginners as they will think all of them are separate functions like input() and raw_input(). You should have mentioned the Input() is used in Python3.3 and raw_input() in previous version that's 2.7. I recommend you write functions about single python versions that you are using otherwise beginners are going to get confused.
3) This is just a suggestion, For me whitespaces in code makes it more readable. Your example like:
If you read other tutorials like Learn Python the Hard Way, they have too stated it's better to leave spaces so that it's more readible like:
For better example here's a simple add function:
No whitespaces
With spacing
You can see the difference yourself.
4) You didn't mention anything about indentation as it's important for a language like Python, one wrong indent in a long code and a beginner is gonna have a heck of a time finding it.
1) Your explanation about Functions in Python is not clear and lacks proper examples
2) You've mention under the Commonly used functions as
Code:
Commonly used Functions
1.print()
2.input() / raw_input()
2.float
3.complexThis might confuse beginners as they will think all of them are separate functions like input() and raw_input(). You should have mentioned the Input() is used in Python3.3 and raw_input() in previous version that's 2.7. I recommend you write functions about single python versions that you are using otherwise beginners are going to get confused.
3) This is just a suggestion, For me whitespaces in code makes it more readable. Your example like:
Code:
>>2+3If you read other tutorials like Learn Python the Hard Way, they have too stated it's better to leave spaces so that it's more readible like:
Code:
>>> 2 + 3For better example here's a simple add function:
No whitespaces
Code:
def addition(x,y):
return x+yWith spacing
Code:
def addition(x, y):
return x + yYou can see the difference yourself.
4) You didn't mention anything about indentation as it's important for a language like Python, one wrong indent in a long code and a beginner is gonna have a heck of a time finding it.




![[+]](https://sinister.li/images/modern/collapse_collapsed.png)