0% found this document useful (0 votes)
21 views22 pages

Shaumya Final Report

Internship report
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)
21 views22 pages

Shaumya Final Report

Internship report
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/ 22

Internship Report

On
PYTHON PROGRAMMING
In partial fulfillment of requirements for the degree
Of

Bachelor of Technology
In
Computer Science & Engineering
(Artificial Intelligence and Machine Learning)

Submitted By:
Mr. Shaumya Srivastava
Roll Number: 2301331530155
B. Tech CSE(AIML) 2nd Year

Under the Guidance of:


Ms.Shweta
(Assistant Professor, Department of CSE(AIML))

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING


(Artificial Intelligence Machine Learning)
NOIDA INSTITUTE OF ENGG. & TECHNOLOGY, GREATER NOIDA, GAUTAM BUDDH NAGAR
(AN AUTONOMOUS INSTITUTE)

(Approved by AICTE and affiliated to Dr. A.P.J. Abdul Kalam Technical University, Uttar
Pradesh, Lucknow)
2024
i
CERTIFICATE

I hereby certify that the work which is being submitted in the Project Report entitled
“CORE Python” in partial fulfillment of the requirements for the award of the Bachelor of
Technology in Computer Science and Engineering Artificial Intelligence Machine
Learning and submitted to the Department of Computer Science & Engineering Artificial
Intelligence, Noida Institute of Engineering & Technology, Greater Noida is an
authentic record of my Internship carried out during Third semester under the supervision of
Ms.Shweta, Department of Computer Science and Engineering Artificial Intelligence
Machine Learning, Noida Institute of Engineering & Technology, Greater Noida. The
matter embodied in this project Report is original and has not been submitted for the award
of any other degree or diploma.

Shaumya Srivastava

This is to certify the above statement made by the candidate is correct and true to the
best of my knowledge.

Signature of Supervisor Signature of HOD


Ms.Shweta Mr.Raju
(Assistant Professor) (Associate Professor)

ii
DECLARATION

I hereby declare that this submission is my own project and that, to the best of
my own knowledge and belief, it contains no material previously published by
another person nor material which to a substantial extent has been accepted for
the award of any other degree or diploma of the university or other institute of
higher learning except where due acknowledgement has been made in the text.

Signature of Candidate

iii
ACKNOWLEDGEMENT

Successfully completing any task gives us satisfaction as well as internal


strength for future problems but the person alone has never existed. He is truly
accompanied by few people. They use to give the person support as well as
suggestion to successfully complete the work. So I feel pleasure for thanking
all such great people who motivates me and provides me kind support at all
stages of my Internship Project work.
Firstly, I would like to honor my institute “Noida Institute of Engineering &
Technology, Greater Noida”. Here I have been provided with a workplace
and infrastructure to learn recent technologies and conceptual background to
strengthen my programming and professional skills.
I am very much grateful to Ms. Shweta, Assistant Professor (Computer
Science and Engineering Artifical Intelligence and Machine Learning),
Noida Institute of Engineering & Technology, Greater Noida, for her
helpful attitude and encouragement in making my project.
Furthermore, I am thankful to, all faculty members for motivating me and to
the Staffs of computer labs in the department for providing excellent valuable
facility as well as issuing me a computer system of good configuration and
providing regular maintenance.
I would like to extend special thanks to all my batch mates for their love,
encouragement and constant support. Last but not least I would like to thank my
parents for supporting me to complete my project report in all ways.

Shaumya Srivastava

iv
Table of the Contents:

TITLE Pg No.
S. No.

1. Certificate ii.

2. Declaration iii.

3. Acknowledgement iv

4. Internship Certificate 6

5. Internship Platform 7

5. About Python 8

6. History of Python 9

7. Advantages of Python 10

8. Project Code 1 11-12

9. Project Code 2 13-17

10. Project Code 3 18-20

11. Conclusion 21

12. References 22

5
INTERNSHIP
CERTIFICATE

6
INTERNSHIP PLATFORM
The purpose of this presentation is to provide a detailed account of my
internship experience at “CODSOFT”. A 4 weeks course of complete Python.
The training consisted of Introduction to Python, Using Variables in
Python,Basics of Programming in Python,Principles of ObjectOriented
Programing,Developing a GUI,Application of Python in Various Disciplines.

They are passionate about technology and believe in the power of software to
transform the world. Their internship program is just one of the ways in which
they are investing in the future of the industry.

7
ABOUT PYTHON

Python is an interpreted, object-oriented, high-level programming language


with dynamic semantics. Its high-level built in data structures, combined with
dynamic typing and dynamic binding, make it very attractive for Rapid
Application Development, as well as for use as a scripting or glue language to
connect existing components together. Python's simple, easy to learn syntax
emphasizes readability and therefore reduces the cost of program maintenance.
Python supports modules and packages, which encourages program
modularity and code reuse.

Debugging Python programs is easy: a bug or bad input will never cause a
segmentation fault. Instead, when the interpreter discovers an error, it raises an
exception. When the program doesn't catch the exception, the interpreter prints
a stack trace. A source level debugger allows inspection of local and global
variables, evaluation of arbitrary

8
HISTORY OF PYTHON

The programming language Python was conceived in the late 1980s, and its
implementation was started in December 1989 by Guido van Rossum at CWI
in the Netherlands as a successor to ABC capable of exception handling and
interfacing with the Amoeba operating system. Pl Van Rossum is Python's
principal author, and his continuing central role in deciding the direction of
Python is reflected in the title given to him by the Python community,
Benevolent Dictator for Life (BDFL). (However, Van Rossum stepped down
as leader on July 12, 2018.). Python was named after the BBCTVshow
Monty Python's Flying Circus.

Python 2.0 was released on October 16, 2000, with many major new features,
including a cycle-detecting garbage collector (in addition to reference
counting) for memory management and support for Unicode. However, the
most important change was to the development process itself, with a shift to a
more transparent and community-backedprocess.

Python 3.0, a major, backwards-incompatible release, was released on


December 3, 2008after a long period of testing. Many of its major features
have also been backported to the backwards-compatible, though now-
unsupported, Python 2.6 and 2.7.

9
ADVANTAGES OF PYTHON

• Easy to read, learn and code


• Dynamic Typing
• Free, Open Source
• Portable
• Extensive Third-Party Libraries
• Wide Range of Applications
• Extensible and Integrable to Other ProgrammingLanguages
• Interpreted Language
• Functional, Object-Oriented, and Procedural
• Involvement in Large Projects.
• Memory Management
• Improved Productivity
• Vast Community Integration to IoT devices like Arduino, Raspberry Pi,
etc.

10
PROJECT CODE 1
PASSWORD GENERATOR
from tkinter import *

import random tk=Tk()

tk.geometry('300x300')

tk.configure(background='pink')

# To store/retrieve the string value entered by user

password=StringVar()

# To store/retrieve the Integer value entered by user

pas=IntVar()

pas.set('Enter Length')

# Function to generate a random passworddef

password_generator():

characters='abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRST
UVWXYZ1234567890 !@#$%^&*()'

Password=''

if pas.get()>=8:

for i in range(pas.get()):

Password+=random.choice(characters)

password.set(Password)

# Function to copy generated password to clipboarddef

copyclipboard():

random_password = password.get()

pyperclip.copy(random_password)

11
Label(tk,text="Copied to Clipboard",bg="red").pack(pady=6)

# Label to display the primary instruction to user to enter the length of


passwod he requires

Label(tk, text="Enter the number to get password \n (Minimum length


should be 8)",bg='Blue',fg='white').pack(pady=3)

# To store the entry of user

Entry(tk, textvariable=pas).pack(pady=3)

# To generate Random password and confirmation by the button click

Button(tk, text="Generate Password",


command=password_generator,bg='black',fg='white').pack(pady=7)

Entry(tk, textvariable=password).pack(pady=3)

Button(tk, text="Copy to clipboard",


command=copyclipboard,bg='black',fg='white').pack()

# To initiate and display the root window we created

tk.mainloop()

OUTPUT

12
PROJECT CODE 2

CALCULATOR

from tkinter import *

root=Tk()

root.title("Simple Calculator")

#creating main frame

mainframe=Frame(root,width=45,bd=10,relief=RIDGE,bg="blue")

mainframe.pack()

inner=Frame(mainframe,width=45,bd=10,relief=RIDGE,bg="black")inner.pack()

e=Entry(inner,width=65,borderwidth=5)

e.grid(row=0,column=0,columnspan=4,padx=10,pady=1)def

onclick(num):

x=e.get()

e.delete(0,END)

e.insert(0,str(x)+str(num))

def clear():

e.delete(0,END)

def add():

global first,op

op="+"

first=e.get()

13
e.delete(0,END)

def sub():

global

first,op op='-'

first=e.get()

e.delete(0,END)

def mul():

global first,op

op='*'

first=e.get()

e.delete(0,END)

def div():

global first,op

op='/'

first=e.get()

e.delete(0,END)

def equal():

second=e.get()

if op=='+':

result=float(first)+float(second)

elif op=='-':

result=float(first)-float(second)

elif op=='*':

result=float(first)*float(second)
14
elif op=='/':

result=float(first)/float(second)

e.delete(0,END)

e.insert(0,result)

#############################################

####Button widget####

button_1=Button(inner,text="1",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(1))

button_2=Button(inner,text="2",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(2))

button_3=Button(inner,text="3",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(3))

button_4=Button(inner,text="4",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(4))

button_5=Button(inner,text="5",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(5))

button_6=Button(inner,text="6",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(6))

button_7=Button(inner,text="7",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(7))

button_8=Button(inner,text="8",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(8))

button_9=Button(inner,text="9",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(9))

button_0=Button(inner,text="0",padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=lambda:onclick(0))#

operation button

15
button_add=Button(inner,text='+',padx=30,pady=10,relief=RIDGE,font=1
5,width=4,command=add)

button_sub=Button(inner,text='-
',padx=30,pady=10,relief=RIDGE,font=15,width=4,command=sub)

button_mul=Button(inner,text='*',padx=30,pady=10,relief=RIDGE,font=1
5,width=4,command=mul)

button_div=Button(inner,text='/',padx=30,pady=10,relief=RIDGE,font=15
,width=4,command=div)

button_equal=Button(inner,text='=',padx=30,pady=10,relief=RIDGE,font
=15,width=4,command=equal)

button_clear=Button(inner,text='C',padx=30,pady=10,relief=RIDGE,font
=15,width=4,command=clear)

#####place the number button######

#####place the number button######

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)

16
button_add.grid(row=1,column=3)

button_sub.grid(row=2,column=3)

button_mul.grid(row=3,column=3)

button_div.grid(row=4,column=3)

button_equal.grid(row=4,column=2)

button_clear.grid(row=4,column=1)

root.mainloop()

OUTPUT

17
PROJECT CODE 3

TO DO LIST

#importing modules

from tkinter import*

from tkinter import messagebox

#create functions

def newtask():

task=my_entry.get()

if task !="":

lb.insert(END,task)

my_entry.delete(0,"end")

else:

messagebox.showwarning("warning","Please enter some task")def

deleteTask():

lb.delete(ANCHOR)

#configure and create main window

ws=Tk()

ws.geometry("750x550")

ws.title("TO DO LIST")

ws.config(bg="#223441")

# creating widgets

18
frame=Frame(ws)

frame.pack(pady=10)

lb=Listbox(frame,width=25,height=8,font=("Times",18),bd=0,fg='#464646
',selectbackground='#a6a6a6',activestyle=None)

lb.pack(side=LEFT,fill=BOTH) task_list=['WAKE

UP','DRINK WATER','HAVE
BATH','MEDITATE','WRITE JOURNAL','MAKE
NOTES','BREAKFAST','GO OUT']

for item in task_list:

lb.insert(END,item)

sb=Scrollbar(frame)

sb.pack(side=RIGHT,fill=BOTH)

lb.config(yscrollcommand=sb.set)

sb.config(command=lb.yview)

my_entry=Entry(ws,font=('times',20))

my_entry.pack(pady=20)

buttonframe=Frame(ws)

buttonframe.pack(pady=20)

#add task button

add_task=Button(buttonframe,text="Add
Task",font=('times',14),bg="green",padx=20,pady=10,command=newtask
)

add_task.pack(fill=BOTH,expand=True,side=LEFT)#deleting

a task button

del_task=Button(buttonframe,text="Delete a
Task",font=('times',14),bg="yellow",padx=20,pady=10,command=deleteT ask)
19
del_task.pack(fill=BOTH,expand=True,side=LEFT)

#creating mainloop

ws.mainloop()

OUTPUT

20
CONCLUSION

We are extremely grateful to "CODSOFT" for allowing me to learn, improve, and


apply my python knowledge in a professional situation. The virtual style of the
internship demonstrated the organization's agility and dedication to developing fresh
talent amiddifficult circumstances.

In a nutshell, this internship has been an excellent and rewarding experience. I


can conclude that there have been a lot I've learnt from my work at
"CODSOFT". Needless to say, the technical aspects of the work I've done are
not flawless and could be improved provided enough time.

As someone with no prior experience with python GUI whatsoever I believe my


time spent in research and discovering it was well worth it and contributed to
finding an acceptable solution to build a fully functional web service. Two main
things that I've learned the importance of are time-management skills and self-
motivation.

21
REFERENCES

 Bonneau, J. (2012). The Science of Randomness: How Random Number


Generators Work and Their Importance in Security. Retrieved from
https://www.schneier.com/
 Henson, R. (2006). SQLite: A Practical Introduction to the Database Engine.
O'Reilly Media.
 Knuth, D. (1997). The Art of Computer Programming, Volume 1: Fundamental
Algorithms. 3rd ed. Addison-Wesley.
 Lutz, M. (2013). Learning Python. 5th ed. O'Reilly Media.
 Van Rossum, G. (2009). Python Programming Language. ACM SIGPLAN
Notices, 44(1), 5-23.
 Zelle, J. (2004). Python Programming: An Introduction to Computer Science.
Franklin, Beedle & Associates.

22

You might also like