You are on page 1of 16

Python Programming Language

A Seminar Report Submitted


In Partial Fulfilment of the Requirement
for the Degree of
Bachelor of Technology

Student Name: Mohd Sameer Ahmad Roll No. 201810101110106

Co-ordinator: Mr. Anupam Singh

FACULTY OF COMPUTER SCIENCE


INSTITUTE OF TECHNOLOGY
SHRI RAMSWAROOP MEMORIAL UNIVERSITY

March, 2020
Table of content-
1. Table of content -------------------------------------------- 2
2. Introduction ------------------------------------------------- 3-5
3. Literature Reviewed --------------------------------------- 6-12
3.1 Web Development ---------------------------------- 6-7
3.2 Desktop Applications ------------------------------- 8-10
3.3 Artificial Intelligence & Data Science ----------- 11-12
4. Summary ----------------------------------------------------- 13
5. Conclusion --------------------------------------------------- 14
6. Future Scope ------------------------------------------------ 15
7. Reference ---------------------------------------------------- 16
Introduction -
Python is an open source (as it has BSD (Berkeley Source Distribution)
licence) object oriented, function oriented, and structural
programming language which is used in almost all the fields of science
and technology and was developed by Guido van Rossum in 1991.
Keeping the history of Python apart it’s known as one of the popular
and emerging programming languages of these times and its usage is
increasing about 800 percent per year and is expected to acquire
more.

Python is being used in almost all the kinds of software development


technologies i.e. Web Development, Desktop application
development, Mobile Application Development, etc. Python is mainly
known for its bundle of useful libraries which is highly encouraged by
experienced developers. It has greatly influenced Artificial
Intelligence, and Data Science with its number of libraries as
developers prefers it over any other programming languages. Python
has its own web app for its libraries which is known as PyPi (Python
Package Index) and one can install its libraries or import those in their
projects just by specifying a command i.e. –

pip install package_name


visit – pypi.org for more information on it.
Here’s a picture that depicts how Python had been getting popular
Python is even recommended to those who are extreme beginners to
this programming world as it has simpler and cleaner code which are
more specific and readable when compared to other programming
languages. Python is compiled as well as interpreted language, and it
uses PVM (Python Virtual Machine) to convert the byte code to a
machine understandable code which is implicit as we don’t need to
compile and interpret it explicitly like other programming languages
instead, we just need to type
“python filename.py” and the rest is being done by python which
makes it easier for the programmers to run and debug their codes.
Here a program that prints “hello world” in python and other
programming languages –
For Python – For JAVA –
print(‘Hello World’) import java.lang;
public static class Hello {
public static void main (String[] args)
System.out.print(“Hello World”);
}
For C – For C++ -
#include<stdio.h> #include<iostream.h>
void main () void main()
{ {
printf(“Hello World”); cout<<”Hello World”;
} }
These above written codes clearly indicate that how cleaner the
codes in python are.
Literature Reviewed

Here’s a review and a brief introduction of where Python is being used


in today’s world –
Web Development –
When it comes to web python had been outstanding with its one of
most the popular framework known as Django which is a web
framework that provides a basic structure for any kind of Web
Application and makes it easier for the developers to prepare a
completely operating Web App within less amount of time.
Django uses MVT (Model Views Templates) structure which is one of
the preferred structures by programmers as it saves time, has
modularity in it and is easier to debug. Django comes with ORM’s
(Object Relational Mapping) which means that we could create tables
of a database just by writing a class for it i.e. we don’t need to spend
longer on making or designing a database as Django say no to SQL
instead it renders database queries through those classes wrote by the
programmers.
Refer to Django documentation for further queries.
Here’s a snapshot of a blog app created by me using Django frame-
work where users can create a post, update, delete, and modify it.
Users can even login by creating an account in my blog app where then
can modify their profile, reset their password through email and many
more.
Desktop Application –
When it comes to Desktop Applications Python had been an unbeaten
performer with its attractive and responsive GUI’s (Graphical User
Interface) which gives user a nice and smoother experience.
Python has two of its popular libraries for its Desktop Apps –
• TKinter
• PyQT
Using the above-mentioned libraries, one can create a professional
desktop application like MS Word, Adobe Reader, Media Players, etc.
While I have been using TKinter for building Desktop Applications
therefore through my experience I could say that it provides a lot of
built in widgets for developing Desktop Apps and they are really
simpler to implement when compared to other programming
languages, and codes are cleaner and easier to understand.
Here’s a snapshot of a calculator app that I have build using Tkinter
where you could perform basic arithmetic operations –
Here’s is the code snippet that builds the above-mentioned
calculator app –
from tkinter import *

root = Tk()
root.title('My Calculator')

e = Entry(root, width=35, borderwidth=5)


e.grid(row=0, column=0, columnspan=3, padx=10, pady=10)
# e.insert(0, "Enter your name : ")

def button_click(number):
current = e.get()
e.delete(0, END)
e.insert(0, str(current) + str(number))

def button_clear():
e.delete(0, END)

def button_arithmetic(operator):
first_number = e.get()
global f_num
global math
math = operator
f_num = float(first_number)
e.delete(0, END)

def button_equal():
second_number = float(e.get())
e.delete(0, END)
if math == 'addition':
e.insert(0, f_num + second_number)
elif math == 'subtraction':
e.insert(0, f_num - second_number)
elif math == 'multiplication':
e.insert(0, f_num * second_number)
elif math == 'division':
e.insert(0, f_num / second_number)

# define buttons...
button_1 = Button(root, text='1', padx=40, pady=20, command=lambda:
button_click(1))
button_2 = Button(root, text='2', padx=40, pady=20, command=lambda:
button_click(2))
button_3 = Button(root, text='3', padx=40, pady=20, command=lambda:
button_click(3))
button_4 = Button(root, text='4', padx=40, pady=20, command=lambda:
button_click(4))
button_5 = Button(root, text='5', padx=40, pady=20, command=lambda:
button_click(5))
button_6 = Button(root, text='6', padx=40, pady=20, command=lambda:
button_click(6))
button_7 = Button(root, text='7', padx=40, pady=20, command=lambda:
button_click(7))
button_8 = Button(root, text='8', padx=40, pady=20, command=lambda:
button_click(8))
button_9 = Button(root, text='9', padx=40, pady=20, command=lambda:
button_click(9))
button_0 = Button(root, text='0', padx=40, pady=20, command=lambda:
button_click(0))
button_decimal = Button(root, text='.', padx=40, pady=20, command=lambda:
button_click('.'))
button_clear = Button(root, text='<', padx=40, pady=20, command=button_clear)
button_add = Button(root, text='+', padx=39, pady=20, command=lambda:
button_arithmetic('addition'))
button_subtract = Button(root, text='-', padx=41, pady=20, command=lambda:
button_arithmetic('subtraction'))
button_multiply = Button(root, text='*', padx=40, pady=20, command=lambda:
button_arithmetic('multiplication'))
button_divide = Button(root, text='/', padx=41, pady=20, command=lambda:
button_arithmetic('division'))
button_equal = Button(root, text='=', padx=91, pady=20, command=button_equal)

# put buttons on the screen...


button_1.grid(row=3, column=0)
button_2.grid(row=3, column=1)
button_3.grid(row=3, column=2)

button_4.grid(row=2, column=0)
button_5.grid(row=2, column=1)
button_6.grid(row=2, column=2)

button_7.grid(row=1, column=0)
button_8.grid(row=1, column=1)
button_9.grid(row=1, column=2)

button_0.grid(row=4, column=0)
button_decimal.grid(row=4, column=1)
button_clear.grid(row=4, column=2)

button_add.grid(row=5, column=0)
button_equal.grid(row=5, column=1, columnspan=2)

button_subtract.grid(row=6, column=0)
button_multiply.grid(row=6, column=1)
button_divide.grid(row=6, column=2)

root.mainloop()
Artificial Intelligence and Data Science –
Python had been ruling this field form many years. When it comes to
AI and DS developers first think of Python over any other
programming languages because it has a number of libraries for
performing any kind of stuffs that involves learning artificially or
building an AI or ML models for predictions. I would like to mention
that Data Science had been one of the emerging fields of computer
science and has a lot of future scope as data is very important to all of
us even for a person who don’t even use a computer or a mobile
phone. Developers use to sell data and get paid for it, as for making a
prediction model one needs past data of whatever stuff he is going to
build.
I would like to mention some of my favourite Python libraries that I
like to use in my Data Science projects –
For numerical or scientific calculations, we need –
• NumPy
• Sci-py
For working with data frame or some kind of data we need –
• Pandas
For visualization (plotting graphs) we need –
• Matplotlib
• Seaborn
For building AI / ML models we need –
• Scikit-Learn
• TensorFlow
• Kera’s, etc.
Here’s a code snipped that depicts the use of the above-mentioned
libraries –
import numpy as np
import matplotlib.pyplot as plt

house_prices = np.random.normal(200000, 25000, 5000)

# A histogram plotted using motplotlib.pyplot.hist

plt.hist(house_prices, 200)
plt.show()

And here’s the corresponding output –


Summary

I just loved Python as it’s my favourite programming language, and got


to know that where all the programming languages are used. It’s just
everywhere in all the fields of science and technology. Through this
programming language I got to implement my algorithms in the real
world. Its cleaner codes helped me a lot in debugging. From Python I
learned many of the new skills which ever software engineer is
destined to learn.

This programming language provided me all the kinds structures


through which a software project is managed and arranged to have
high coupling and low modularity.

Through Python I learned to code Web Applications (cross-platform


apps), how a page in a website is maintained, how to handle a GET,
POST, PUSH, DELETE, etc. kind of requests, and many other necessary
stuffs which are required to build a web app.

It gave me a setup to build desktop applications which are completely


responsive and attractive as well as through this programming
language I learned to code Machine Learning models, visualization,
and many other skills of Data Science.
Conclusion

While learning Python I got to know that how vast this programming
language is and how difficult that gets when learning to its advanced
level but it gets usual by building a habit of coding.

Learning Python brought me to a conclusion that its worth learning


Python with whatever field of computer science you wanted to move
ahead and its really easier when compared to other programming like
JAVA, Java Script, Ruby, R, C, C++, etc. While being an interpreted
language it warns you over every statement of your code when having
an exception or an error.
Future Scope

As Google, Microsoft, Amazon, and other tech giants have been


shifting their code to python therefore this implies that how great the
future of Python and Python Developers is going to be.

Whether you wanted to be a self-taught developer or a software


developer or Data Scientist in one of those big tech giants then
obviously one must go for Python for a bright future as progress stats
of programming languages from Google and GitHub says that Python
is having a rapid growth in its popularity with almost 800% per year.

Python developers are paid high wages for their work and is expected
to increase with the passage of time.
References

I won’t have ever been able to complete this report without referring
to Guido van Rossum creator of Python, and help from some of the
below mentioned websites –
• www.wikipedia.org
• www.python.org

Special thanks to https://codewithmosh.com which acted as an


instructor to me for completing this report and provided me with all
of the fundamentals of Python.

Thanks to HOD Ma’am, and Faculty Co-ordinator of Industrial Visit Mr.


Anupam Singh who assigned us this interesting work.

You might also like