Posts

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:

Python Comment

Image
What is Comment Comment is used for indication of code whenever we use comment that are ignored by compiler & interpreter. Creating Comment To make comment we need to use "#" Example: #This is comment in python We need to use "#" for single and multiple lines of comments but we can use '''.....''' or """...""" because string literals will always be ignored by python when not assigned to variable. 

Python Tutorial - Install Python and Create Simple Program

Image
Installing Python Its very easy to install follow steps below shown. step 1: Visit https://www.python.org / setp 2: click on Downloads option and as you click on then it will show you latest version of python then click on it to download. setp 3: Dont forget to click on Add to Path Add Python to Path Step 4: It is installed. Create Simple Program If i compare python language with other language then python syntax are very easy and simple for example in c you have to write atleast 3 lines of code to print "hello world" but in python we only need to write print("hello world") to show hello world. Lets Start To make print "Hello world" To write program in python you can use any IDE but here i am using IDLE that is by default which is provided by python. Step 1: Open IDLE Starting IDLE Setp 2: When it is started it looks like this IDLE Shell Step 3: Click on File->New-File Menu to make new file Step 4: Write print method t...

Python Tutorial Introduction

Introduction to Python python is object-oriented and high-level programming language.its syntax and prototype makes it simple to learn. it was developed by Guido van Rossum in 1980s. Why to Learn Python 1) It is simple 2) It is object-oriented Programming Language 3) Many Popular software,websites are made in python for example instagram,spotify,etc. 4) It is easy to learn 5) It is easy to read 6) It is extendable Python Scope Nowadays python is very popular because of its AI,Data Science trends.in python you can create any software,website,mobile-app etc.Python is All in one Language. Python Is very Simple Language If we talk about python then within one line of code you can print statement and other than python language you have to write more than one line of code and other example is if we want to create AI app/software then python has its great libraries & frameworks using that you can make AI app/software and in other language you have to write double li...