create account

Python Rules Of Coding: Comments by alrashel

View this thread on: hive.blogpeakd.comecency.com
· @alrashel ·
Python Rules Of Coding: Comments
Previous 
[Python Rules Of Coding: Naming Conventions](https://hive.blog/hive-122108/@alrashel/python-rules-of-coding-naming-conventions)

![code-1084923_1280.png](https://images.hive.blog/DQmUZ6UfTSYvnT52mhXuoTfb5LG8TXNHfJ8BVktt7zkXhAh/code-1084923_1280.png)
<center>[Source](https://pixabay.com/photos/code-programming-python-1084923/)</center>

<center><b>Python Rules Of Coding: Comments</b></center>

## Comments : 
For In-Code documentation in Python, comments are so essentials. Comments are the extra understanding layer of the code. It should be simple and verbosely so that it can be read and understand easily. Comments start with the '#' (hashtag ) symbol  in Python.

## Conventions: 

1. Updating the code and keep changing the comments according to that.
2. Comments should be simple, verbose, and complete sentences.
3. The way we write a sentence in general comments should be like that.
4. If a comment is short and one line, we can avoid using the period in the end.
5. Multi-line comments are called block comments. Every sentence must end in a period.

![py1.JPG](https://images.hive.blog/DQmaMVVrKaqhY7aGq5gY7RgKXVJm6DKmDobBViG2223Cvbf/py1.JPG)

Always try to use inline comments, because it is so important to understand the code easily.

![py2.JPG](https://images.hive.blog/DQmWhsJNzDJAB8uxrxVLqiSqbkGNmB4tcGmyCf17XF7K6Sy/py2.JPG)

### Next
#### String Quotes, and User Documentation

<center>.............................................</center>
👍  , , , , , ,
properties (23)
authoralrashel
permlinkpython-rules-of-coding-comments
categoryhive-122108
json_metadata{"tags":["stem","programming","python","educations4all"],"image":["https://images.hive.blog/DQmUZ6UfTSYvnT52mhXuoTfb5LG8TXNHfJ8BVktt7zkXhAh/code-1084923_1280.png","https://images.hive.blog/DQmaMVVrKaqhY7aGq5gY7RgKXVJm6DKmDobBViG2223Cvbf/py1.JPG","https://images.hive.blog/DQmWhsJNzDJAB8uxrxVLqiSqbkGNmB4tcGmyCf17XF7K6Sy/py2.JPG"],"links":["https://hive.blog/hive-122108/@alrashel/python-rules-of-coding-naming-conventions","https://pixabay.com/photos/code-programming-python-1084923/"],"app":"hiveblog/0.1","format":"markdown"}
created2020-05-01 06:43:21
last_update2020-05-01 06:43:21
depth0
children0
last_payout2020-05-08 06:43:21
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,471
author_reputation2,707,464,674,673
root_title"Python Rules Of Coding: Comments"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id97,112,808
net_rshares19,730,593,005
author_curate_reward""
vote details (7)