Standards to Practice 04

Data Types - Numbers and its in-built functions:

 I have referred some functions are used only for Numeric values, .

I would recommend the Python Numbers for Reference , for easy understanding of basics, due to ease available basic tutorials, are not re-iterated in this blog.

Standards to Practice:

On Programmer point, structure and error less code is require for any problematic approach, each time a programmer code 100 lines, he/she not to recheck code for logic and bugs so.
Documentation and standard of coding practice is much helpful while re-approach of code by other programmers to understand better at any time.

Declaring Variables (user variables):

Numeric types are integer and float , prefix with "i" for INT and "f" for float, "li" or "i" are good to use.

String types to be prefix with "str"

Boolean types to be prefix with "b"

List type to be prefix with "ls".

Tuple type to be prefix with "tp"

Set type to be prefix with "st".

Dictionary type to be prefix with "dy".


Declaring functions or Modules, have to represent an action or verb with its return type as suffix.

Sample 01

def change_name_str( ls_names):
...

def changeName_str(ls_Names):
....

Note: don't use numbers for variables like var01 , test1, myname12. This will be easy while code, is not a best practice for later document and bug fix.

NextPage >> Class and NameSpaces

Comments

Most popular

Learn Python Basics