0% found this document useful (0 votes)
11 views4 pages

APPLICATION DEVELOPMENT LAB Notes cts4

The document provides an introduction to Python, a versatile programming language created by Guido van Rossum in 1991, highlighting its applications in web development, software development, and system scripting. It emphasizes Python's readability, simplicity, and cross-platform compatibility, along with its features such as being an interpreted and dynamically typed language. Additionally, it covers basic concepts like variables, expressions, and the installation process for Python.

Uploaded by

Divya Shanmughan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views4 pages

APPLICATION DEVELOPMENT LAB Notes cts4

The document provides an introduction to Python, a versatile programming language created by Guido van Rossum in 1991, highlighting its applications in web development, software development, and system scripting. It emphasizes Python's readability, simplicity, and cross-platform compatibility, along with its features such as being an interpreted and dynamically typed language. Additionally, it covers basic concepts like variables, expressions, and the installation process for Python.

Uploaded by

Divya Shanmughan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

APPLICATION DEVELOPMENT LAB

Python Introduction
Python is a popular programming language. It was created by Guido van Rossum, and released in 1991.
It is used for:
 web development (server-side),
 software development,
 mathematics,
 system scripting.

Python can do
 Python can be used on a server to create web applications.
 Python can be used alongside software to create workflows.
 Python can connect to database systems. It can also read and modify files.

Why Python?
 Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
 Python has a simple syntax similar to the English language.
 Python has syntax that allows developers to write programs with fewer lines than some other programming
languages.
 Python runs on an interpreter system, meaning that code can be executed as soon as it is written. This means
that prototyping can be very quick.
 Python can be treated in a procedural way, an object-oriented way or a functional way.

Good to know
 The most recent major version of Python is Python 3.
 Python will be written in a text editor.

Python Syntax compared to other programming languages


 Python was designed for readability, and has some similarities to the English language with influence from
mathematics.
 Python uses new lines to complete a command, as opposed to other programming languages which often use
semicolons or parentheses.
 Python relies on indentation, using whitespace, to define scope; such as the scope of loops, functions and
classes. Other programming languages often use curly-brackets for this purpose.

Features of python

1. Easy To Learn and Readable Language


2. Interpreted Language
3. Dynamically Typed Language
4. Open Source And Free
5. Large Standard Library
6. High-Level Language
7. Object Oriented Programming Language
8. Large Community Support
9. Platform Independent
10. Extensible and Embeddable
11. Graphical User Interface (GUI) Support

Python Editors and Installing Python


Before getting into details of the programming language Python, it is better to learn how to
install the software.
Python is freely downloadable from the internet.
Install python

sudo apt get install python3

Run python program

gedit filename.py

python3 filename.py

VARIABLES, EXPRESSIONS AND STATEMENTS After understanding some important concepts about
programming and programming languages, we will now move on to learn Python as a programming
language with its syntax and constructs. Values and Types A value is one of the basic things a
program works with.

 It may be like 2, 10.5, “Hello” etc

. Each value in Python has a type. Type of 2 is integer; type of 10.5 is floating point number

 “Hello” is string etc. The type of a value can be checked using type function as shown below

>>> type("hello")

<class ‘ str’>

>>> type(3)

<class ‘ int’>

>>> type(10.5)

<class ‘ float’>

>>> type("15")

<class ‘ str’>

Variables A variable is a named-literal which helps to store a value in the program.

 Variables may take value that can be modified wherever required in the program.

 Note that, in Python, a variable need not be declared with a specific type before its usage.

 Whenever we want a variable, just use it. The type of it will be decided by the value assigned to
it. A value can be assigned to a variable using assignment operator (=)

 Consider the example given below–

 >>> x=10
>>> print(x) 10 #output

>>> type(x) #type of x is integer

>>> y="hi"

>>> print(y) hi #output

>>> type(y) #type of y is string

It is observed from above examples that the value assigned to variable determines the type of that
variable.

Variable Names and Keywords It is a good programming practice to name the variable such that
its name indicates its purpose in the program

You might also like