Professional Documents
Culture Documents
Calci Roject
Calci Roject
Calci Roject
NAME : S. Vennela
CLASS : XII A
ROLL NO : 08
Submitted to : Mrs. Savita Rani
TABLE OF CONTENTS
S. No. TOPIC
1 CERTIFICATE
2 ACKNOWLEDGMENT
3 INTRODUCTION TO PYTHON
4 HISTORY OF PYTHON
5 SYSTEM REQUIREMENTS
6 INTRODUCTION TO PROJECT
7 PROGRAM CODE
8 OUTPUT
9 SCOPE OF PROJECT
10 BIBLIOGRAPHY
CERTIFICATE
PRINCIPAL
ACKNOWLEDGEMENT
Apart from the efforts of me, the success of any project depends
largely on the encouragement and guidelines of many others. I take
this opportunity to express my gratitude to the people who have been
instrumental in the successful completion of this project.
My sincere Thanks to, Mrs. Savita Rani, A guide, Mentor all the
above a friend, who critically reviewed my project and helped in
solving each and every problem, occurred during implementation of
the project
The guidance and support received from all the members who
contributed and who are contributing to this project, was vital for the
success of the project. I am grateful for their constant support and
help.
INTRODUCTION TO PYTHON
Applications :
GUI based desktop applications
Graphic design, image processing
applications, Games, and Scientific
computational Applications
Web frameworks and applications
Enterprise and Business applications
Operating Systems
Database Access
Language Development
Software Development
History of Python:
Python is a 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.
SYSTEM REQUIREMENTS
HARDWARE REQUIREMENT:
Printer- to print the required documents of the
project.
Compact Drive
Proccesor: Pentium III and above
RAM: 256 MB(minimum)
Hard-Disk : 20 GB(minimum)
SOFTWARE REQUIREMENT:
Windows 7 or higher
My-SQL server 5.5 or higher (as backend)
Python idle 3.6 or higher or spyder (as frontend).
Microsoft Word 2010 or higher for
documentation.
INTRODUCTION TO THE PROJECT
def backspace(entry):
input_len = len(entry.get())
entry.delete(input_len - 1)
def clear(entry):
entry.delete(0, END)
def calc(entry):
input_info = entry.get()
try:
output = str(eval(input_info.strip()))
except ZeroDivisionError:
popupmsg()
output = ""
clear(entry)
entry.insert(END, output)
def popupmsg():
popup = Tk()
popup.resizable(0, 0)
popup.geometry("120x100")
popup.title("Alert")
label = Label(popup, text="Cannot divide by 0 ! \n Enter valid
values")
label.pack(side="top", fill="x", pady=10)
B1 = Button(popup, text="Okay", bg="#DDDDDD",
command=popup.destroy)
B1.pack()
def cal():
root = Tk()
root.title("Calculator by vennela")
entry_font = font.Font(size=15)
entry = Entry(root, justify="right", font=entry_font)
entry.grid(row=0, column=0, columnspan=4, sticky=N + W + S
+ E, padx=5, pady=5)
cal_button_bg = '#FF6600'
num_button_bg = '#4B4B4B'
other_button_bg = '#DDDDDD'
text_fg = '#FFFFFF'
button_active_bg = '#C0C0C0'
num_button=partial(Button,root,fg=text_fg, bg=num_button_bg,
padx=10, pady=3, activebackground=button_active_bg)
button7=num_button(text='7',bg=num_button_bg,command=la
mbda: get_input(entry, '7'))
button7.grid(row=2, column=0, pady=5)
button8=num_button(text='8',command=lambda:get_input(entry
'8'))
button8.grid(row=2, column=1, pady=5)
button9=num_button(text='9',command=lambda:get_input(entry,
'9'))
button9.grid(row=2, column=2, pady=5)
button10=cal_button(text='+',command=lambda:get_input(entry,
'+'))
button10.grid(row=4, column=3, pady=5)
button4=num_button(text='4',command=lambda:get_input(entry,
'4'))
button4.grid(row=3, column=0, pady=5)
button5=num_button(text='5',command=lambda:get_input(entry,
'5'))
button5.grid(row=3, column=1, pady=5)
button6=num_button(text='6',command=lambda:get_input(entry,
'6'))
button6.grid(row=3, column=2, pady=5)
button11=cal_button(text='-',command=lambda: get_input(entry,
'-'))
button11.grid(row=3, column=3, pady=5)
button1=num_button(text='1',command=lambda:get_input(entry,
'1'))
button1.grid(row=4, column=0, pady=5)
button2=num_button(text='2',command=lambda:get_input(entry,
'2'))
button2.grid(row=4, column=1, pady=5)
button3=num_button(text='3',command=lambda:get_input(entry,
'3'))
button3.grid(row=4, column=2, pady=5)
button12=cal_button(text='*',command=lambda:get_input(entry,
'*'))
button12.grid(row=2, column=3, pady=5)
button0=num_button(text='0',command=lambda:get_input(entry,
'0'))
#button0.grid(row=5, column=0, columnspan=2, padx=3,
pady=5, sticky=N + S + E + W)
button0.grid(row=5, column=0, pady=5)
button13=num_button(text='.',command=lambda:get_input(entr
y, '.'))
button13.grid(row=5, column=1, pady=5)
root.mainloop()
if _name_ == '_main_':
cal()
OUTPUT
SCOPE OF THE PROJECT
BOOKS:
WEBSITES:
www.geeksforgeeks.org
https://docs.python.org/3/
https://www.w3schools.com/python/