Posts

Showing posts from April, 2020

Python Tutorial - Creating Variables

Image
What is Variables? Variable is used to store data value unlike other programming language python has no command for declaring variable for example in c,c++,java you have to define type of variable it can be int,float,double,string etc.But in python we don't have to explicit define data type python does it implicitly. Creating Variables? For Creating Variable We only need to define variable name then assigning value for that variable and we can use that value by calling the name of variable. Input                                                           Output As above example display there i have used two variable name,y and assigned variable to them then printed that variable's value. Variable Names Should contain  1) Variable name can start with letter or underscore  2) Variable name can not start with digit ...

Python Indentation or Python Syntax

Image
What is Python Indentation or Python Syntax? Indentation is nothing but kind of space if we talk about c language,java then this programming language uses "{}" curly braces to separate code but in python we need to use space for separating line of code. For example: to use indentation only have to enter then automatically it will indent on that indent we have to use statement to be executed Output: