Вы находитесь на странице: 1из 11

Content

What is Python?
• Python is popular programming language .
• It was first introduced in 1991 by Guido van Rossum.
• Python is programing language as well as scripting language.
• Python is also called as Interpreted language.
• Python is used for web development , software development etc.
What can python do?
• Python can connect the data base system .
• To create a web application.
• Python can used to handle big data and perform complex
mathematics.
Why Python?
• Python Works on different platform like window, LINEX, MAC,UNIX,
etc.
• Python has simple syntax similar to the english language.
• Python has syntax that allow developers to write program with few
lines than some other programing language.
• Python runs on an interpreter system meaning that code can be
executed as soon as it is written.
• Recent version of python is 3.
• Python can be written in text editor PyCharm, eclipse.
Python syntax compare to the other
programing language.
• Python was designed for readability and has some similarities to the
English language which influence from mathematics.
• Python uses new line to complete a command.
• Python release on indentation using which space to define scope
such as the scope of loops, functions and classes . Other programing
language use curly brackets for this purpose.
Creating variables
• Variables are container for storing data values.
• Unlike other programming language python has no command for
declaring a variable.
• A variable is created the moment you first assigned a values to it.
• example:-
• (1) x=5 #x is type of int.
• (2) x=“Abulaish” # x is type of string.
Rules for python Variable
• A variable name must start with a letter or the underscore character.
• A variable name can not start with a number.
• A variable name can only contain alphanumeric characters and
underscores.
• Variable names are case sensitive.
• Example:-AGE , age both are different variable.
Output Variables
• Python print statement is often used to output variables. example:-
x=“computer” print(x)
• To combine both text and variable python used the “+” character.
• You can also used the + character to add a variable to another variable.
e.g.:- x=“python is “
y= “programing language”
z=x+y
print(z)
• For numbers the + character work as a mathematical operator.
e.g.:- x=4 y=6 print(x+y).
• If try to combine a string and a number python will give you error. Eg:- x=4
y=“Aman” print(x+y) # error
Data types
• Numbers can be integers(1or 3),float(1.2 or2.6) and complex.
• String
• List
• Tuple
• Sets

Вам также может понравиться