Python Tutorial - codebugfree

Python Tutorial

Python Introduction

 In this section we learn and the describe the all python from basic to beginner. Python is the one of the types of computer programming language. Mainly it is use for general purpose. Computer programming language is interact between human to machine language

Machine Language is work on binary digits like 0,1 It is difficult to know the human beings. So the programming language understand the binary digits. So Programming language is also known as a translator to binary digit to human read able.

Python is a beginner friendly Language. Python syntax is very easy. Python support the windows, ios, android, linux.

Python Variable and its function

Python variable  is important because it store the datatypes. We did not use the python Reserved keyword. Python reserved keyword is use than program give error. Does not start variable names with number like 1codebug, 2hello.

Python Does not allow to use module name as variable. When you import the module python confused with variable name and module name.

Mainly beginner programmer mistake when make python file. Python file Doesnot allow the python reserved keyword. 

Python built in function is make by python developer. no need to import that function available in python as a default. Python have two type of function def function and lamda function.

Def function is more use in python programmer but Lamda function is use by rare programmer. Lamda function is also the anonymous function.

Python Data Types

Python datatypes is the groups of string integer. string integers is the keyword of data type. They are various types listed below :
1) string
2) integers
3) boolen
4) float
5) decimal

Data types are different types they are list, set, dictionary, tupple.  List is allow to create the duplicate value in one list. List is excess able. Set is not allow to create the duplicate value. 

Dictionary is the group of word meaning. It is also called collection of word and meaning. Dictionary has key and value to access or see the word and meaning. 

Tuple is kindly different types of Data types. Tuple does not access able. Tuple is rare to use.

Python Method Datatype

Data types of method are different for datatypes they are: append, pop, remove, del, capitalize, len, endswith, get update, reverse, clear,

Python Loops

Python Types of Loop

Mainly two types of python loop they are: for loop and while loop. for loop is use as a range system and while loop is use as a given condition.

If there is no condition for given the while loop than use the True keyword. True keyword is reserved by python programmer. 

For loop is start with given range as from here to there.

LOOP statements

Mainly loops statement are use as the python loops to skip or ignore some out of the loop. To stop the loop when condition match or loop outpu complete.

The major two types of loops method they are: break and continue

Break statement use as a loop to stop the loop from given the condition. when given condition is match than break statement exit or stop the loop.

Continue statement is ignore the some value. If given condition is match than that condition output is ignore or skip from loop.

Python Function

Python File I/O

File I/O is use to acces the any file. To read or write. File I/O create the any file and given input and out put from file. Mainly use syntax is open with(filename.txt) as e:   

File I/o has different mode and different method. They are read, write, binary. And the method is write line , read line, write, read, 

Python If else

If else in Python

If else is a condition system. Give condition from user and compire the program condition. If condition math than print else condition ignore. If condition doesnot math than else condition pring.

They are many types:

tf statement

if else statement

if else elif statement

if  else ladder statement

Python OOps

Python OOPs concept

Python oops concept reduce the code of python. It is confused in beginner programmer. OOPs maintain the code read ability. OOPs has different types of class. Inheritence class, Multiple inheritance , Multilevel inheritance,. 

Make the class use the init constructor to pass the attributes to object. Making the object and print the value of object.

OOPS Method or Function

Python oops has different types of method and different function They are listed below:

Property decorators ; It has inculed the two types of method they are getter and setter method. One method is set the property and another method is acess the property.

Cls method to acess the class to change the class attributes or class variable. It is change the some value from class.

static method is use in def function. That def function is run with ignore the opps variabe attributes.

Abstrack method is also use in def function but that def function is alo use for other class as a same name and function.

Post a Comment