Python Coding
Python Coding
● The following documentation and comment styles are to be used for the
code submitted by the teams.
● Replace all the <Description> tags from the comments below to add
appropriate content for your application.
Each user’s code file should start with File Level comments in the format as
follows:
```
* Team Id : <Team Id>
* Author List : <Name of the team members who worked on this function
* (Comma separated e.g. Name1, Name2)>
* Filename: <Filename>
* Theme: <Theme name -- Specific to eYRC / eYRCPlus >
* Functions: <Comma separated list of Functions defined in this file>
* Global Variables: <List of global variables defined in this file, none if no global
* variables>
```
Each function should have the following comment section before it:
```
* Function Name: <Function Name>
* Input: < Inputs (or Parameters) list with description if any>
* Output: < Return value with description if any>
* Logic: <Description of the function performed and the logic used
* in the function>
* Example Call: <Example of how to call this function>
```
3. Variable Comments
In general the variable/function names should be descriptive enough to
give a good idea of what the variable is used for., For example, variable
names like black_line_threshold_value', 'left_motor_turn_right' are
preferable and makes your code readable. Variable names like 'a', 'b' and
'temp' are not acceptable variable names.
In some cases, variable names might require some description for which
the following format can be used:
# Variable Name: Description of the variable and the range of expected values of the variable.
4. Implementation Comments
An Illustrative Example: