SlideShare a Scribd company logo
1 of 27
Download to read offline
9
CHAPTER 1
INTRODUCTION
Python Language Introduction:
Python is widely used general-purpose, high level programming language. It was
initially designed by Guido van Rossum in 1991 and developed by Python Software
Foundation. It was mainly developed for emphasis on code readability, and its syntax allows
programmers to express concepts in fewer lines of code.Python is a programming language
that lets you work quickly and integrate systems more efficiently.
Python is a high-level, interpreted, interactive and object-oriented scripting language.
Python is designed to be highly readable. It uses English keywords frequently where as other
languages use punctuation, and it has fewer syntactical constructions than other languages.
• Python is Interpreted - Python is processed at runtime by the interpreter. You do
not need to compile your program before executing it. This is similar to PERL and
PHP.
• Python is Interactive – You can actually sit at a Python prompt and interact with
the interpreter directly to write your programs.
• Python is Object-Oriented – Python supports Object-Oriented style or techniques
of programming that encapsulates code within objects.
10
1.1.1 Python Features:
Fig.1.2 Features
Python's features include:
• Easy-to-learn − Python has few keywords, simple structure, and a clearly
defined syntax. This allows the student to pick up the language quickly.
• Easy-to-read − Python code is more clearly defined and visible to the eyes.
• Easy-to-maintain − Python's source code is fairly easy-to-maintain.
• A broad standard library − Python's bulk of the library is very portable and
cross-platform compatible on UNIX, Windows, and Macintosh.
11
• Interactive Mode − Python has support for an interactive mode which allows
interactive testing and debugging of snippets of code.
• Portable − Python can run on a wide variety of hardware platforms and has the
same interface on all platforms.
• Extendable − You can add low-level modules to the Python interpreter. These
modules enable programmers to add to or customize their tools to be more
efficient.
• Databases − Python provides interfaces to all major commercial databases.
• GUI Programming − Python supports GUI applications that can be created and
ported to many system calls, libraries and windows systems, such as Windows
MFC, Macintosh, and the X Window system of Unix.
• Scalable − Python provides a better structure and support for large programs
than shell scripting.
1.1.2Future Technologies Counting On Python
Generally, we have seen that python programming language is extensively used
for web development, application development, system administration,
developing games etc.But there are some future technologies that are relying on
python. As a matter of fact, Python has become the core language as far as the success
of these technologies is concerned. Let’s dive into the technologies which use python
as a core element for research, production and further developments.
12
(1)Artificial Intelligence (AI)
Python programming language is undoubtedly dominating the other
languages when future technologies like Artificial Intelligence(AI) comes into
the play.There are plenty of python frameworks, libraries, and tools that are
specifically developed to direct Artificial Intelligence to reduce human efforts with
increased accuracy and efficiency for various development purposes.
It is only the Artificial Intelligence that has made it possible to develop speech
recognition system, autonomous cars, interpreting data like images, videos etc.
We have shown below some of the python libraries and tools used in various Artificial
Intelligence branches.
• Machine Learning- PyML, PyBrain, scikit-learn, MDP Toolkit, GraphLab Create,
MIPy etc.
• General AI- pyDatalog, AIMA, EasyAI, SimpleAI etc.
• Neural Networks- PyAnn, pyrenn, ffnet, neurolab etc.
• Natural Language & Text Processing- Quepy, NLTK, genism
(2)Big Data
The future scope of python programming language can also be predicted by the
way it has helped big data technology to grow. Python has been successfully
contributing in analyzing a large number of data sets across computer clusters through
its high-performance toolkits and libraries.
13
Let’s have a look at the python libraries and toolkits used for Data analysis and
handling other big data issues.
• Pandas
• Scikit-Learn
• NumPy
• SciPy
• GraphLab Create
• IPython
• Bokeh
• Agate
• PySpark
• Dask
(3)Networking
Networking is another field in which python has a brighter scope in the future.
Python programming language is used to read, write and configure routers and
switches and perform other networking automation tasks in a cost-effective and secure
manner.
For these purposes, there are many libraries and tools that are built on the top of the
python language. Here we have listed some of these python libraries and tools
especially used by network engineers for network automation.
14
• Ansible
• Netmiko
• NAPALM(Network Automation and Programmability Abstraction Layer with
Multivendor Support)
• Pyeapi
• Junos PyEZ
• PySNMP
• Paramiko SSH
1.1.3 PYTHON MODULES:
A python module can be defined as a python program file which contains a python
code including python functions, class, or variables. In other words, we can say that our
python code file saved with the extension (.py) is treated as the module. We may have
a runnable code inside the python module.
Modules in Python provides us the flexibility to organize the code in a logical way.To
use the functionality of one module into another, we must have to import the specific
module.
Example In this example, we will create a module named as file.py which contains a
function func that contains a code to print some message on the console.
Let's create the module named as file.py.
15
#displayMsg prints a message to the name being passed.
def displayMsg(name)
print("Hi "+name);
Loading the module in our python code
We need to load the module in our python code to use its functionality. Python
provides two types of statements as defined below.
1. The import statement
2. The from-import statement
The import statement
The import statement is used to import all the functionality of one module into
another. Here, we must notice that we can use the functionality of any python source
file by importing that file as the module into another python source file.
We can import multiple modules with a single import statement, but a module is
loaded once regardless of the number of times, it has been imported into our file
The syntax to use the import statement is given below.
import module1,module2,........ module
The from-import statement
Instead of importing the whole module into the namespace, python provides the
flexibility to import only the specific attributes of a module. This can be done by using
from? Import statement. The syntax to use the from-import statement is given below.
From < module-name> import <name 1>, <name 2>..,<name n>
16
11111ERJBJMC++ vs J
1.2 Objects and Turtle Graphics
1.3.1 Turtle Program:
import turtle # allows us to use the turtles library
wn = turtle.Screen() # creates a graphics window
alex = turtle.Turtle() # create a turtle named alex
alex.forward(150) # tell alex to move forward by 150 units
alex.left(90) # turn by 90 degrees
alex.forward(75) # complete the second side of a rectangle
The first line tells Python to load a module named turtle. That module brings us two
new types that we can use: the Turtle type, and the Screen type. The dot
notation turtle.Turtle means “The Turtle type that is defined within the turtle module”.
(Remember that Python is case sensitive, so the module name, turtle, with a
lowercase t, is different from the type Turtle because of the uppercase T.)
We then create and open what the turtle module calls a screen (we would prefer to
call it a window, or in the case of this web version of Python simply a canvas), which
we assign to variable wn. Every window contains a canvas, which is the area inside
the window on which we can draw.
In line 3 we create a turtle. The variable alex is made to refer to this turtle. These first
three lines set us up so that we are ready to do some drawing.
17
In lines 4-6, we instruct the object alex to move and to turn. We do this
by invoking or activating alex’s methods — these are the instructions that all turtles
know how to respond to.
1.3.2 Turtle Methods:
Here are a few more things that you might find useful as you write programs
that use turtles.
• Turtle methods can use negative angles or distances. So tess.forward(- 100) will
move tess backwards, and tess.left(-30) turns her to the right. Additionally, because
there are 360 degrees in a circle, turning 30 to the left will leave you facing in the
same direction as turning 330 to the right! (The on-screen animation will differ,
though — you will be able to tell if tess is turning clockwise or counter-clockwise!)
This suggests that we don’t need both a left and a right turn method — we could be
minimalists, and just have one method. There is also a backward method. (If you are
very nerdy, you might enjoy saying alex.backward(-100) to move alex forward!)
Reviewing a few basic facts about geometry and number lines, like we’ve done here is
a good start if we’re going to play with turtles.
• A turtle’s pen can be picked up or put down. This allows us to move a turtle to a
different place without drawing a line. The methods are up and down. Note that the
methods penup and pendown do the same thing.
18
• alex.up()
• alex.forward(100) # this moves alex, but no line is drawn
• alex.down()
• Every turtle can have its own shape. The ones available “out of the box” are arrow,
blank, circle, classic, square, triangle, turtle.
• alex.shape("turtle")
• You can speed up or slow down the turtle’s animation speed. (Animation controls
how quickly the turtle turns and moves forward). Speed settings can be set between 1
(slowest) to 10 (fastest). But if you set the speed to 0, it has a special meaning — turn
off animation and go as fast as possible.
• alex.speed(10)
• A turtle can “stamp” its footprint onto the canvas, and this will remain after the
turtle has moved somewhere else. Stamping works even when the pen is up.
1.4 BOOLEAN EXPRESSIONS
1.4.1 Boolean values and Boolean Expressions:
The Python type for storing true and false values is called bool, named after
the British mathematician, George Boole. George Boole created Boolean Algebra,
which is the basis of all modern computer arithmetic. There are only two boolean
values. They are True and False. Capitalization is important, since true and false are
not boolean values (remember Python is case sensitive).
19
The == operator is one of six common comparison operators; the others are:
x != y # x is not equal to y
x > y # x is greater than y
x < y # x is less than y
x >= y # x is greater than or equal to y
x <= y # x is less than or equal to y
1.4.2 Conditional Execution:
In order to write useful programs, we almost always need the ability to check
conditions and change the behavior of the program accordingly. Conditional
statements give us this ability. The simplest form is the if statement:
if x > 0 :
print 'x is positive'
The boolean expression after the if statement is called the condition. We end
the if statement with a colon character (:) and the line(s) after the if statement are
indented.
Fig.1.3 Condition Execution
20
If the logical condition is true, then the indented statement gets executed. If the
logical condition is false, the indented statement is skipped.
1.4.3 Nested Conditionals:
One conditional can also be nested within another. For example, assume we
have two integer variables, x and y. The following pattern of selection shows how we
might decide how they are related to each other.
if x < y:
print("x is less than y")
else:
if x > y:.
print("x is greater than y")
else:
print("x and y must be equal")
The outer conditional contains two branches. The second branch (the else from the
outer) contains another if statement, which has two branches of its own. Those two
branches could contain conditional statements as well.
21
CHAPTER 2
TOOLS AND TECHNIQUES
2.1 PLATFORM USED:
This section is to present a detailed description of the Platforms used for this
project. It explains the hardware and software requirements for developing the
application and its interface, tested features of the program
• What the program will do
• The constraints under which it must operate
• And how the program react to external stimuli
2.1.1 Hardware Used:
• Processors: Any two or higher core processor including Intel® Core™ i5
@2.60GHz, new-gen Xeon® processor @2.30 GHz or AMD Ryzen 5 CPUs running
at higher frequency
• RAM: 4GB of system memory from any decent manufacturer
• Disk space: 2-3GB of SEAGATE Hard Drive
• Operating System: Windows 10 Official, Mac OS 10.12.6 (and up), or
Linux/Ubuntu 16.10+
22
2.1.2 Software Used:
This program is developed in a platform of Microsoft windows 10 Operating
System. Microsoft Windows is a series of graphical interface operating systems
designed, developed, marketed, and sold by Microsoft onwards from November 20,
1985. The most recent versions of Windows 10 and 10.1. The other Supported
Operating Systems are:
Windows 7 SPI (x86 and x64)
Windows 8 (x86 and x64)
Windows 10 (x64 and x86)
There are also many Ide’s (integrated development environment ) available for
Python. A brief list is as shown below:
IDE Type Platfor
m
Url
IDLE - A GUI
based IDE
that comes
pre-installed
with the
reference
implementat
ion
Open Source Windo
ws, Mac
OS,
Linux
https://www.python.org/download/
23
Pycharm –
A GUI based
IDE by
Jetbrains
supporting
code-
completion,
code-
debugging,
refactoring
etc.
Commercial/F
ree
Community
Edition
Windo
ws, Mac
OS,
Linux
https://www.jetbrains.com/pycharm/d
ownload/
IDE Type Platform Url
Anaconda is
a free and
open source
distribution
of the Python
and R
programming
languages for
data science
and machine
learning
related
applications
Free and
Open
Source
Windows,
Mac OS,
Linux
https://www.anaconda.com/download/
24
that aims to
simplify
pacage
management
and
deployment
Table.2.1
In this Project we have used Anaconda as an integrated development environment.
Fig.2.1 Anaconda
25
Anaconda Navigator is a desktop graphical user interface (GUI) included in
Anaconda® distribution that allows you to launch applications and easily manage
conda packages, environments, and channels without using command-line
commands. Navigator can search for packages on Anaconda.org or in a local
Anaconda Repository. It is available for Windows, macOS, and Linux.
The following applications are available by default in Navigator:
• JupyterLab
• Jupyter Notebook
• Spyder
• PyCharm
• VSCode
• Glueviz
• Orange 3 App
• RStudio
• Anaconda Prompt (Windows only)
• Anaconda PowerShell (Windows only)
26
CHAPTER 3
ABOUT CALCULATOR
In Python, we can create a simple calculator for performing the different
arithmetical operations, such as addition, subtraction, multiplication, and division.
Approach:
We can choose the desired operation from the option of a, b, c, and d. We can
take two numbers, and if… elif… else, branching is used for executing the particular
operation.
We will use add(), subtract(), multiply() and divide() function for evaluation the
respective operation in the calculator.
Please select operation -
a. Add
b. Subtract
c. Multiply
d. Divide
Select operations form a, b, c, d: "c"
Please enter first number: 11
27
Please enter second number: 4
11 * 4 = 44
Introduction
The Python programming language is a great tool to use when working with
numbers and evaluating mathematical expressions. This quality can be utilized to make
useful. In this program, we ask the user to choose an operation. Options 1, 2, 3, and 4
are valid. If any other input is given, Invalid Input is displayed and the loop continues
until a valid option is selected. Two numbers are taken and an if...elif...else branching is
used to execute a particular section. User-defined functions add(), subtract(),
multiply() and divide() evaluate respective operations and display the output.
programs. This tutorial presents a learning exercise that outlines how to make a
command-line calculator program in Python 3. This calculator will be able to perform
only basic arithmetic, but the final step of this guide serves as a starting point for how
you might improve the code to create a more robust calculator. We’ll be using math
operators, variables, conditional statements, functions, and handle user input to make
our calculator.
Prerequisites
For this tutorial, you should have Python 3 installed on your local computer and
have a programming environment set up on the machine. If you need to install Python
or set up the environment, you can do so by following the appropriate guide for your
operating system.
28
Prompt Users for Input
Calculators work best when a human provides equations for the computer to
solve. You’ll start writing your program at the point where the human enters the
numbers that they would like the computer to work with. First, you’ll create a file for
your program. For this example, we’ll use the text editor nano and name the file
calculator.py: nano calculator.py Next, you’ll add contents to this file to run your
program. For this program, you’ll have the user input two numbers, so instruct the
program to prompt the user for two numbers. You can do this by using Python’s built-
in input() function to accept user-generated input from the keyboard. Inside of the
parentheses of the input() function you can pass a string to prompt the user, and then
assign the user’s input to a variable. Keep in mind that when asking for input, it can be
helpful to include a space at the end of your string so that there is a space between the
user’s input and the prompting string:
calculator.py
number_1 = input('Enter your first number: ')
number_2 = input('Enter your second number: ')
After writing two lines, you should save the program before running it. If you’re using
nano, you can exit by pressing CTRL + X then Y and ENTER.
29
CHAPTER 3
IMPLEMENTATION
"""CALCULATOR"""
x = print("Resultn")
print(" Welcome to the calculator. this is make by OM BAJPAI ")
print("please enter the problem which you want to slove ")
print("+ for additionn "
"- for subtractionn"
" * for multiplicationn"
"/ for divisionn"
"** for powern")
while(True):
num1=int(input("Enter the first numbern"))
num2=int(input("Enter the second numbern"))
operator=input("Enter your operatorn")
if operator=="+":
30
print(num1+num2)
if operator=="-":
print(num1-num2)
if operator=="*":
print(num1*num2)
if operator=="/":
print(num1/num2)
if operator=="**":
print(num1**num2)
again=input("Do you want to use the Calcualtor again?n if Yes press y , if No press nn ")
print(again)
if again=="y":
continue
else:
print("Thanks for using my Calculator. see you soon")
break
31
CHAPTER 4
SCREENSHOTS
32
33
34
CHAPTER 5
CONCLUSION
This project has really been faithful and informative. It has made us
learn and understand the many trivial concepts of Python Language.
So,this was an easy and fun way to create a Snake Water and Gun game .It is
customizable, as per a developer’s personal preference. Not just Snake Water and Gun
game, but many more games can be developed easily in python using various tools
and libraries available.
Here we learn modules and nested if else statements. Finally it has taught us a
valuable lifelong lesson about the improvements working and learning new things.
35
CHAPTER 6
BIBLIOGRAPHY
1. The complete reference of python edition by Martin C. Brown
2. www.geeksforgeeks.org
3. www.tutorialspoint.com

More Related Content

What's hot

summer training report on python
summer training report on pythonsummer training report on python
summer training report on pythonShubham Yadav
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1Kanchilug
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with pythonPraveen M Jigajinni
 
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On PythonShivam Gupta
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the StyleJuan-Manuel Gimeno
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialQA TrainingHub
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming LanguageLaxman Puri
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming KrishnaMildain
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPTShivam Gupta
 
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWPYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWEditorIJAERD
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming pptismailmrribi
 
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...pythoncharmers
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Carlos Miguel Ferreira
 

What's hot (19)

summer training report on python
summer training report on pythonsummer training report on python
summer training report on python
 
Python quick guide1
Python quick guide1Python quick guide1
Python quick guide1
 
Chapter 8 getting started with python
Chapter 8 getting started with pythonChapter 8 getting started with python
Chapter 8 getting started with python
 
Seminar report On Python
Seminar report On PythonSeminar report On Python
Seminar report On Python
 
Python Workshop
Python WorkshopPython Workshop
Python Workshop
 
Basics of python
Basics of pythonBasics of python
Basics of python
 
Python: the Project, the Language and the Style
Python: the Project, the Language and the StylePython: the Project, the Language and the Style
Python: the Project, the Language and the Style
 
Python | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python TutorialPython | What is Python | History of Python | Python Tutorial
Python | What is Python | History of Python | Python Tutorial
 
Python Programming Language
Python Programming LanguagePython Programming Language
Python Programming Language
 
Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming Python programming | Fundamentals of Python programming
Python programming | Fundamentals of Python programming
 
Python Seminar PPT
Python Seminar PPTPython Seminar PPT
Python Seminar PPT
 
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEWPYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
PYTHON CURRENT TREND APPLICATIONS- AN OVERVIEW
 
Python final ppt
Python final pptPython final ppt
Python final ppt
 
Python Programming ppt
Python Programming pptPython Programming ppt
Python Programming ppt
 
Programming
ProgrammingProgramming
Programming
 
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...Python for Science and Engineering: a presentation to A*STAR and the Singapor...
Python for Science and Engineering: a presentation to A*STAR and the Singapor...
 
Python - the basics
Python - the basicsPython - the basics
Python - the basics
 
Intro to Python
Intro to PythonIntro to Python
Intro to Python
 
Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.Python 3.5: An agile, general-purpose development language.
Python 3.5: An agile, general-purpose development language.
 

Similar to Report om 3

Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxlemonchoos
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdfgmadhu8
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptxArpittripathi45
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1Kirti Verma
 
Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Mohan Arumugam
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptxHaythamBarakeh1
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to pythonMohammed Rafi
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unitmichaelaaron25322
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfKosmikTech1
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data sciencebhavesh lande
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptxGnanesh12
 
PYTHON FEATURES.pptx
PYTHON FEATURES.pptxPYTHON FEATURES.pptx
PYTHON FEATURES.pptxMaheShiva
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfYadavHarshKr
 

Similar to Report om 3 (20)

Python programming
Python programmingPython programming
Python programming
 
Python_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptxPython_Introduction_Good_PPT.pptx
Python_Introduction_Good_PPT.pptx
 
python-160403194316.pdf
python-160403194316.pdfpython-160403194316.pdf
python-160403194316.pdf
 
python into.pptx
python into.pptxpython into.pptx
python into.pptx
 
Python
PythonPython
Python
 
python presntation 2.pptx
python presntation 2.pptxpython presntation 2.pptx
python presntation 2.pptx
 
Python final presentation kirti ppt1
Python final presentation kirti ppt1Python final presentation kirti ppt1
Python final presentation kirti ppt1
 
Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)Python-Yesterday Today Tomorrow(What's new?)
Python-Yesterday Today Tomorrow(What's new?)
 
Python_Introduction&DataType.pptx
Python_Introduction&DataType.pptxPython_Introduction&DataType.pptx
Python_Introduction&DataType.pptx
 
Introduction to python
Introduction to pythonIntroduction to python
Introduction to python
 
Research paper on python by Rj
Research paper on python by RjResearch paper on python by Rj
Research paper on python by Rj
 
Python unit1
Python unit1Python unit1
Python unit1
 
Python programming language introduction unit
Python programming language introduction unitPython programming language introduction unit
Python programming language introduction unit
 
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdfpython-online&offline-training-in-kphb-hyderabad (1) (1).pdf
python-online&offline-training-in-kphb-hyderabad (1) (1).pdf
 
MODULE 1.pptx
MODULE 1.pptxMODULE 1.pptx
MODULE 1.pptx
 
introduction of python in data science
introduction of python in data scienceintroduction of python in data science
introduction of python in data science
 
4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx4_Introduction to Python Programming.pptx
4_Introduction to Python Programming.pptx
 
PYTHON FEATURES.pptx
PYTHON FEATURES.pptxPYTHON FEATURES.pptx
PYTHON FEATURES.pptx
 
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdfTraining report 1923-b.e-eee-batchno--intern-54 (1).pdf
Training report 1923-b.e-eee-batchno--intern-54 (1).pdf
 
Chapter - 1.pptx
Chapter - 1.pptxChapter - 1.pptx
Chapter - 1.pptx
 

Recently uploaded

Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africaictsugar
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607dollysharma2066
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Timedelhimodelshub1
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Riya Pathan
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncrdollysharma2066
 
Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionMintel Group
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedKaiNexus
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Kirill Klimov
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailAriel592675
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?Olivia Kresic
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCRashishs7044
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,noida100girls
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...lizamodels9
 

Recently uploaded (20)

Kenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby AfricaKenya’s Coconut Value Chain by Gatsby Africa
Kenya’s Coconut Value Chain by Gatsby Africa
 
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
(Best) ENJOY Call Girls in Faridabad Ex | 8377087607
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 
Call Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any TimeCall Girls Miyapur 7001305949 all area service COD available Any Time
Call Girls Miyapur 7001305949 all area service COD available Any Time
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737Independent Call Girls Andheri Nightlaila 9967584737
Independent Call Girls Andheri Nightlaila 9967584737
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / NcrCall Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
Call Girls in DELHI Cantt, ( Call Me )-8377877756-Female Escort- In Delhi / Ncr
 
Future Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted VersionFuture Of Sample Report 2024 | Redacted Version
Future Of Sample Report 2024 | Redacted Version
 
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… AbridgedLean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
Lean: From Theory to Practice — One City’s (and Library’s) Lean Story… Abridged
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024Flow Your Strategy at Flight Levels Day 2024
Flow Your Strategy at Flight Levels Day 2024
 
Case study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detailCase study on tata clothing brand zudio in detail
Case study on tata clothing brand zudio in detail
 
MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?MAHA Global and IPR: Do Actions Speak Louder Than Words?
MAHA Global and IPR: Do Actions Speak Louder Than Words?
 
8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR8447779800, Low rate Call girls in Saket Delhi NCR
8447779800, Low rate Call girls in Saket Delhi NCR
 
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
BEST Call Girls In Old Faridabad ✨ 9773824855 ✨ Escorts Service In Delhi Ncr,
 
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In.../:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
/:Call Girls In Indirapuram Ghaziabad ➥9990211544 Independent Best Escorts In...
 

Report om 3

  • 1. 9 CHAPTER 1 INTRODUCTION Python Language Introduction: Python is widely used general-purpose, high level programming language. It was initially designed by Guido van Rossum in 1991 and developed by Python Software Foundation. It was mainly developed for emphasis on code readability, and its syntax allows programmers to express concepts in fewer lines of code.Python is a programming language that lets you work quickly and integrate systems more efficiently. Python is a high-level, interpreted, interactive and object-oriented scripting language. Python is designed to be highly readable. It uses English keywords frequently where as other languages use punctuation, and it has fewer syntactical constructions than other languages. • Python is Interpreted - Python is processed at runtime by the interpreter. You do not need to compile your program before executing it. This is similar to PERL and PHP. • Python is Interactive – You can actually sit at a Python prompt and interact with the interpreter directly to write your programs. • Python is Object-Oriented – Python supports Object-Oriented style or techniques of programming that encapsulates code within objects.
  • 2. 10 1.1.1 Python Features: Fig.1.2 Features Python's features include: • Easy-to-learn − Python has few keywords, simple structure, and a clearly defined syntax. This allows the student to pick up the language quickly. • Easy-to-read − Python code is more clearly defined and visible to the eyes. • Easy-to-maintain − Python's source code is fairly easy-to-maintain. • A broad standard library − Python's bulk of the library is very portable and cross-platform compatible on UNIX, Windows, and Macintosh.
  • 3. 11 • Interactive Mode − Python has support for an interactive mode which allows interactive testing and debugging of snippets of code. • Portable − Python can run on a wide variety of hardware platforms and has the same interface on all platforms. • Extendable − You can add low-level modules to the Python interpreter. These modules enable programmers to add to or customize their tools to be more efficient. • Databases − Python provides interfaces to all major commercial databases. • GUI Programming − Python supports GUI applications that can be created and ported to many system calls, libraries and windows systems, such as Windows MFC, Macintosh, and the X Window system of Unix. • Scalable − Python provides a better structure and support for large programs than shell scripting. 1.1.2Future Technologies Counting On Python Generally, we have seen that python programming language is extensively used for web development, application development, system administration, developing games etc.But there are some future technologies that are relying on python. As a matter of fact, Python has become the core language as far as the success of these technologies is concerned. Let’s dive into the technologies which use python as a core element for research, production and further developments.
  • 4. 12 (1)Artificial Intelligence (AI) Python programming language is undoubtedly dominating the other languages when future technologies like Artificial Intelligence(AI) comes into the play.There are plenty of python frameworks, libraries, and tools that are specifically developed to direct Artificial Intelligence to reduce human efforts with increased accuracy and efficiency for various development purposes. It is only the Artificial Intelligence that has made it possible to develop speech recognition system, autonomous cars, interpreting data like images, videos etc. We have shown below some of the python libraries and tools used in various Artificial Intelligence branches. • Machine Learning- PyML, PyBrain, scikit-learn, MDP Toolkit, GraphLab Create, MIPy etc. • General AI- pyDatalog, AIMA, EasyAI, SimpleAI etc. • Neural Networks- PyAnn, pyrenn, ffnet, neurolab etc. • Natural Language & Text Processing- Quepy, NLTK, genism (2)Big Data The future scope of python programming language can also be predicted by the way it has helped big data technology to grow. Python has been successfully contributing in analyzing a large number of data sets across computer clusters through its high-performance toolkits and libraries.
  • 5. 13 Let’s have a look at the python libraries and toolkits used for Data analysis and handling other big data issues. • Pandas • Scikit-Learn • NumPy • SciPy • GraphLab Create • IPython • Bokeh • Agate • PySpark • Dask (3)Networking Networking is another field in which python has a brighter scope in the future. Python programming language is used to read, write and configure routers and switches and perform other networking automation tasks in a cost-effective and secure manner. For these purposes, there are many libraries and tools that are built on the top of the python language. Here we have listed some of these python libraries and tools especially used by network engineers for network automation.
  • 6. 14 • Ansible • Netmiko • NAPALM(Network Automation and Programmability Abstraction Layer with Multivendor Support) • Pyeapi • Junos PyEZ • PySNMP • Paramiko SSH 1.1.3 PYTHON MODULES: A python module can be defined as a python program file which contains a python code including python functions, class, or variables. In other words, we can say that our python code file saved with the extension (.py) is treated as the module. We may have a runnable code inside the python module. Modules in Python provides us the flexibility to organize the code in a logical way.To use the functionality of one module into another, we must have to import the specific module. Example In this example, we will create a module named as file.py which contains a function func that contains a code to print some message on the console. Let's create the module named as file.py.
  • 7. 15 #displayMsg prints a message to the name being passed. def displayMsg(name) print("Hi "+name); Loading the module in our python code We need to load the module in our python code to use its functionality. Python provides two types of statements as defined below. 1. The import statement 2. The from-import statement The import statement The import statement is used to import all the functionality of one module into another. Here, we must notice that we can use the functionality of any python source file by importing that file as the module into another python source file. We can import multiple modules with a single import statement, but a module is loaded once regardless of the number of times, it has been imported into our file The syntax to use the import statement is given below. import module1,module2,........ module The from-import statement Instead of importing the whole module into the namespace, python provides the flexibility to import only the specific attributes of a module. This can be done by using from? Import statement. The syntax to use the from-import statement is given below. From < module-name> import <name 1>, <name 2>..,<name n>
  • 8. 16 11111ERJBJMC++ vs J 1.2 Objects and Turtle Graphics 1.3.1 Turtle Program: import turtle # allows us to use the turtles library wn = turtle.Screen() # creates a graphics window alex = turtle.Turtle() # create a turtle named alex alex.forward(150) # tell alex to move forward by 150 units alex.left(90) # turn by 90 degrees alex.forward(75) # complete the second side of a rectangle The first line tells Python to load a module named turtle. That module brings us two new types that we can use: the Turtle type, and the Screen type. The dot notation turtle.Turtle means “The Turtle type that is defined within the turtle module”. (Remember that Python is case sensitive, so the module name, turtle, with a lowercase t, is different from the type Turtle because of the uppercase T.) We then create and open what the turtle module calls a screen (we would prefer to call it a window, or in the case of this web version of Python simply a canvas), which we assign to variable wn. Every window contains a canvas, which is the area inside the window on which we can draw. In line 3 we create a turtle. The variable alex is made to refer to this turtle. These first three lines set us up so that we are ready to do some drawing.
  • 9. 17 In lines 4-6, we instruct the object alex to move and to turn. We do this by invoking or activating alex’s methods — these are the instructions that all turtles know how to respond to. 1.3.2 Turtle Methods: Here are a few more things that you might find useful as you write programs that use turtles. • Turtle methods can use negative angles or distances. So tess.forward(- 100) will move tess backwards, and tess.left(-30) turns her to the right. Additionally, because there are 360 degrees in a circle, turning 30 to the left will leave you facing in the same direction as turning 330 to the right! (The on-screen animation will differ, though — you will be able to tell if tess is turning clockwise or counter-clockwise!) This suggests that we don’t need both a left and a right turn method — we could be minimalists, and just have one method. There is also a backward method. (If you are very nerdy, you might enjoy saying alex.backward(-100) to move alex forward!) Reviewing a few basic facts about geometry and number lines, like we’ve done here is a good start if we’re going to play with turtles. • A turtle’s pen can be picked up or put down. This allows us to move a turtle to a different place without drawing a line. The methods are up and down. Note that the methods penup and pendown do the same thing.
  • 10. 18 • alex.up() • alex.forward(100) # this moves alex, but no line is drawn • alex.down() • Every turtle can have its own shape. The ones available “out of the box” are arrow, blank, circle, classic, square, triangle, turtle. • alex.shape("turtle") • You can speed up or slow down the turtle’s animation speed. (Animation controls how quickly the turtle turns and moves forward). Speed settings can be set between 1 (slowest) to 10 (fastest). But if you set the speed to 0, it has a special meaning — turn off animation and go as fast as possible. • alex.speed(10) • A turtle can “stamp” its footprint onto the canvas, and this will remain after the turtle has moved somewhere else. Stamping works even when the pen is up. 1.4 BOOLEAN EXPRESSIONS 1.4.1 Boolean values and Boolean Expressions: The Python type for storing true and false values is called bool, named after the British mathematician, George Boole. George Boole created Boolean Algebra, which is the basis of all modern computer arithmetic. There are only two boolean values. They are True and False. Capitalization is important, since true and false are not boolean values (remember Python is case sensitive).
  • 11. 19 The == operator is one of six common comparison operators; the others are: x != y # x is not equal to y x > y # x is greater than y x < y # x is less than y x >= y # x is greater than or equal to y x <= y # x is less than or equal to y 1.4.2 Conditional Execution: In order to write useful programs, we almost always need the ability to check conditions and change the behavior of the program accordingly. Conditional statements give us this ability. The simplest form is the if statement: if x > 0 : print 'x is positive' The boolean expression after the if statement is called the condition. We end the if statement with a colon character (:) and the line(s) after the if statement are indented. Fig.1.3 Condition Execution
  • 12. 20 If the logical condition is true, then the indented statement gets executed. If the logical condition is false, the indented statement is skipped. 1.4.3 Nested Conditionals: One conditional can also be nested within another. For example, assume we have two integer variables, x and y. The following pattern of selection shows how we might decide how they are related to each other. if x < y: print("x is less than y") else: if x > y:. print("x is greater than y") else: print("x and y must be equal") The outer conditional contains two branches. The second branch (the else from the outer) contains another if statement, which has two branches of its own. Those two branches could contain conditional statements as well.
  • 13. 21 CHAPTER 2 TOOLS AND TECHNIQUES 2.1 PLATFORM USED: This section is to present a detailed description of the Platforms used for this project. It explains the hardware and software requirements for developing the application and its interface, tested features of the program • What the program will do • The constraints under which it must operate • And how the program react to external stimuli 2.1.1 Hardware Used: • Processors: Any two or higher core processor including Intel® Core™ i5 @2.60GHz, new-gen Xeon® processor @2.30 GHz or AMD Ryzen 5 CPUs running at higher frequency • RAM: 4GB of system memory from any decent manufacturer • Disk space: 2-3GB of SEAGATE Hard Drive • Operating System: Windows 10 Official, Mac OS 10.12.6 (and up), or Linux/Ubuntu 16.10+
  • 14. 22 2.1.2 Software Used: This program is developed in a platform of Microsoft windows 10 Operating System. Microsoft Windows is a series of graphical interface operating systems designed, developed, marketed, and sold by Microsoft onwards from November 20, 1985. The most recent versions of Windows 10 and 10.1. The other Supported Operating Systems are: Windows 7 SPI (x86 and x64) Windows 8 (x86 and x64) Windows 10 (x64 and x86) There are also many Ide’s (integrated development environment ) available for Python. A brief list is as shown below: IDE Type Platfor m Url IDLE - A GUI based IDE that comes pre-installed with the reference implementat ion Open Source Windo ws, Mac OS, Linux https://www.python.org/download/
  • 15. 23 Pycharm – A GUI based IDE by Jetbrains supporting code- completion, code- debugging, refactoring etc. Commercial/F ree Community Edition Windo ws, Mac OS, Linux https://www.jetbrains.com/pycharm/d ownload/ IDE Type Platform Url Anaconda is a free and open source distribution of the Python and R programming languages for data science and machine learning related applications Free and Open Source Windows, Mac OS, Linux https://www.anaconda.com/download/
  • 16. 24 that aims to simplify pacage management and deployment Table.2.1 In this Project we have used Anaconda as an integrated development environment. Fig.2.1 Anaconda
  • 17. 25 Anaconda Navigator is a desktop graphical user interface (GUI) included in Anaconda® distribution that allows you to launch applications and easily manage conda packages, environments, and channels without using command-line commands. Navigator can search for packages on Anaconda.org or in a local Anaconda Repository. It is available for Windows, macOS, and Linux. The following applications are available by default in Navigator: • JupyterLab • Jupyter Notebook • Spyder • PyCharm • VSCode • Glueviz • Orange 3 App • RStudio • Anaconda Prompt (Windows only) • Anaconda PowerShell (Windows only)
  • 18. 26 CHAPTER 3 ABOUT CALCULATOR In Python, we can create a simple calculator for performing the different arithmetical operations, such as addition, subtraction, multiplication, and division. Approach: We can choose the desired operation from the option of a, b, c, and d. We can take two numbers, and if… elif… else, branching is used for executing the particular operation. We will use add(), subtract(), multiply() and divide() function for evaluation the respective operation in the calculator. Please select operation - a. Add b. Subtract c. Multiply d. Divide Select operations form a, b, c, d: "c" Please enter first number: 11
  • 19. 27 Please enter second number: 4 11 * 4 = 44 Introduction The Python programming language is a great tool to use when working with numbers and evaluating mathematical expressions. This quality can be utilized to make useful. In this program, we ask the user to choose an operation. Options 1, 2, 3, and 4 are valid. If any other input is given, Invalid Input is displayed and the loop continues until a valid option is selected. Two numbers are taken and an if...elif...else branching is used to execute a particular section. User-defined functions add(), subtract(), multiply() and divide() evaluate respective operations and display the output. programs. This tutorial presents a learning exercise that outlines how to make a command-line calculator program in Python 3. This calculator will be able to perform only basic arithmetic, but the final step of this guide serves as a starting point for how you might improve the code to create a more robust calculator. We’ll be using math operators, variables, conditional statements, functions, and handle user input to make our calculator. Prerequisites For this tutorial, you should have Python 3 installed on your local computer and have a programming environment set up on the machine. If you need to install Python or set up the environment, you can do so by following the appropriate guide for your operating system.
  • 20. 28 Prompt Users for Input Calculators work best when a human provides equations for the computer to solve. You’ll start writing your program at the point where the human enters the numbers that they would like the computer to work with. First, you’ll create a file for your program. For this example, we’ll use the text editor nano and name the file calculator.py: nano calculator.py Next, you’ll add contents to this file to run your program. For this program, you’ll have the user input two numbers, so instruct the program to prompt the user for two numbers. You can do this by using Python’s built- in input() function to accept user-generated input from the keyboard. Inside of the parentheses of the input() function you can pass a string to prompt the user, and then assign the user’s input to a variable. Keep in mind that when asking for input, it can be helpful to include a space at the end of your string so that there is a space between the user’s input and the prompting string: calculator.py number_1 = input('Enter your first number: ') number_2 = input('Enter your second number: ') After writing two lines, you should save the program before running it. If you’re using nano, you can exit by pressing CTRL + X then Y and ENTER.
  • 21. 29 CHAPTER 3 IMPLEMENTATION """CALCULATOR""" x = print("Resultn") print(" Welcome to the calculator. this is make by OM BAJPAI ") print("please enter the problem which you want to slove ") print("+ for additionn " "- for subtractionn" " * for multiplicationn" "/ for divisionn" "** for powern") while(True): num1=int(input("Enter the first numbern")) num2=int(input("Enter the second numbern")) operator=input("Enter your operatorn") if operator=="+":
  • 22. 30 print(num1+num2) if operator=="-": print(num1-num2) if operator=="*": print(num1*num2) if operator=="/": print(num1/num2) if operator=="**": print(num1**num2) again=input("Do you want to use the Calcualtor again?n if Yes press y , if No press nn ") print(again) if again=="y": continue else: print("Thanks for using my Calculator. see you soon") break
  • 24. 32
  • 25. 33
  • 26. 34 CHAPTER 5 CONCLUSION This project has really been faithful and informative. It has made us learn and understand the many trivial concepts of Python Language. So,this was an easy and fun way to create a Snake Water and Gun game .It is customizable, as per a developer’s personal preference. Not just Snake Water and Gun game, but many more games can be developed easily in python using various tools and libraries available. Here we learn modules and nested if else statements. Finally it has taught us a valuable lifelong lesson about the improvements working and learning new things.
  • 27. 35 CHAPTER 6 BIBLIOGRAPHY 1. The complete reference of python edition by Martin C. Brown 2. www.geeksforgeeks.org 3. www.tutorialspoint.com