Professional Documents
Culture Documents
Chapter 1
Chapter 1
2021-2022
What is Python?
Python is a popular programming language. It was created by Guido van Rossum, and released
in 1991.
It is used for:
•software development.
•Mathematics.
•system scripting.
•Python can connect to database systems. It can also read and modify files.
•Python can be used to handle big data and perform complex mathematics.
•Python can be used for rapid prototyping, or for production-ready software development.
•Python works on different platforms (Windows, Mac, Linux, Raspberry Pi, etc).
•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.
It is an object-oriented programming language which means it works on objects. So what is an object? For example, Tiger is
an object whose color and age are its attributes, and hunting and reproducing its behavior. So, as shown in the above
example, an object has two characteristics: attributes and behavior.
So, there are some basic principles of OOPs as given below:
•Inheritance: In this case, a child class can use the parent class’s behavior and attributes.
•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.
• Numbers
• String basic
• String methods
• Lists
• Tuples
• Dictionaires
• Datatype casting
• If statements
• Functions
• Loops
• Methods
• Library
Whether you are an experienced player in the software development game or just a beginner, you need a quality
integrated development environment (IDE) as a workspace for your codes.
IDE itself is software, consisting of development tools used to develop software and test it. It provides a development
environment where all the tools are available in a single user-friendly Graphical User Interface (GUI).
An IDE mainly includes:
•Code editor to write software codes
•Local construction automation
•Debugger for programs
Apart from these, different IDEs have different features which together help developers in their development stages.
Code editors provide a platform where developers can write and modify codes, but they lack build and test
capabilities.
You can perform many other functions using an IDE such as running and executing your codes, compiling, interpreting,
debugging, version checks, file management and many more.
• PyCharm
• Kdevelop
• SlickEdit
• Thonny
• Visual Studio
• Atom
• LiClipse
• Wing
• Google colab
• jupyter
Variable names with more than one word can be difficult to read.there are several techniques you can use to make them
more readable:
❑ Many Values to Multiple Variables: Python allows you to assign values to multiple variables in one line
❑ One Value to Multiple Variables: you can assign the same value to multiple variables in one line.
❑ Unpack a Collection: if you have a collection of values in a list, tuple etc. Python allows you to extract the values into
variables. This is called unpacking.
In Python, everythings booleans, integers, floats, strings, even large data structures functions and programs
is implemented as an object.
Boolean
Integers
Python
Floats
Strings
BEST FOR You 43
O R G A N I C S C O M P A N Y
Built-in Data Types
If you want to specify the data type of a variable, this can be done with casting.