You are on page 1of 20

Bikes Modifications and

Spares

Done by
Dayanand R
XI - A4
Acknowledgement

I would like to express my special thanks of


gratitude to my Computer Science teacher
“Ms. Nithya" for their guidance and support
in completing my project.

I would also like to extend my gratitude to


the Principal “Mr. Poovannan M” and my
Parents for providing me with all the
facilities needed.

Thank you.
Abstract

Using the Tkinter package, this Python project, named


"Bike Mods and Spares" demonstrates how coding
proficiency may be combined with user-friendly design.
In this project, a graphical user interface (GUI)
application is developed for a made-up bike modification
and spares company called "Dayanand's Bike Mods and
Spares."

Users may explore a wide variety of motorbike models


from well-known companies including Yamaha, Royal
Enfield, BMW, and Kawasaki using the program, which
functions as a virtual platform. The project offers an
immersive experience by smoothly integrating the
Tkinter library, enabling users to browse through various
brands, pick certain bike models, and decide between
repair and customization choices.
Introduction
Combining user-friendly design with technical expertise has
created interesting new opportunities in our constantly
changing tech environment. This project explores a Python
script that uses Tkinter and is a component of our school
assignment. What is its aim? designing a Graphical User
Interface (GUI) application with motorcycle accessories and
modifications as its main emphasis.

Our fictitious store, "Dayanand's Bike Mods and Spares," is now


open. Users of this virtual platform may experience
motorcycles from popular manufacturers such as Yamaha,
Royal Enfield, BMW, and Kawasaki. The application takes
consumers further into the experience than merely buttons.
They can browse different brands, select their ideal bike, and
determine whether it requires maintenance or any additional
style.
This provides an overview of the importance of user-friendly
interfaces, particularly for companies that deal with the
interesting realm of bike repair and customization like ours

CODE

from tkinter import *

from tkinter.font import Font

from PIL import Image, ImageTk

root = Tk()

root.state('zoomed')

root.title("Dayanand's bike mods and spares")

gen_font = Font(family='Comic Sans MS', size=30)

bg = Image.open("daynand.jpg")

bg = ImageTk.PhotoImage(bg)

bgcanvas = Canvas(root, width=1920, height=1080, bd=0, highlightthickness=0)

bgcanvas.pack(fill="both", expand=True)

bgcanvas.create_image(0, 0, image=bg, anchor=NW)

title = bgcanvas.create_text(530, 100, text="Welcome to Dayanand Bike Mods and


Spares", fill="white", font=gen_font, anchor="w")

def main_scn():

global yamaha_button, RE_button, kaw_button, bmw_button


yamaha_img = Image.open("yamaha.jpg")

yamaha_img = ImageTk.PhotoImage(yamaha_img)

yamaha_button = Button(root, width=600, height=336, image=yamaha_img,


borderwidth=0, highlightthickness=0, command=yama_click)

yamaha_button.image = yamaha_img

yamaha_button.place(x=250, y=220)

RE_img = Image.open("Re.jpg")

RE_img = ImageTk.PhotoImage(RE_img)

RE_button = Button(root, width=600, height=338, image=RE_img, borderwidth=0,


highlightthickness=0, command=re_click)

RE_button.image = RE_img

RE_button.place(x=1100, y=220)

bmw_img = Image.open("bmw-4753868_1280.jpg")

bmw_img = ImageTk.PhotoImage(bmw_img)

bmw_button = Button(root, width=600, height=338, image=bmw_img,


borderwidth=0, highlightthickness=0, command=bmw_click)

bmw_button.image = bmw_img

bmw_button.place(x=250, y=650)

kaw_img = Image.open("kawasaki-logo-2021.jpg")

kaw_img = ImageTk.PhotoImage(kaw_img)

kaw_button = Button(root, width=600, height=338, image=kaw_img,


borderwidth=0, highlightthickness=0, command=kaw_click)

kaw_button.image = kaw_img

kaw_button.place(x=1100, y=650)

def destroy_main():
kaw_button.destroy()

bmw_button.destroy()

yamaha_button.destroy()

RE_button.destroy()

bgcanvas.itemconfig(title, text='')

def choosebike():

global choose_bike

choose_bike = bgcanvas.create_text(820, 100, text="Choose a model",


fill="white", font=gen_font, anchor="w")

def yamaha_bikes():

global rx100btn, r15btn

rx100 = Image.open("new-yamaha-rx-100.jpg")

rx100 = ImageTk.PhotoImage(rx100)

rx100btn = Button(root, width=735, height=393, borderwidth=0, image=rx100,


highlightthickness=0, command=rx100_choose)

rx100btn.image = rx100

rx100btn.place(x=200, y=400)

r15 = Image.open("New-Yamaha-R15-V3-17.jpg")

r15.resize((735, 393))

r15 = ImageTk.PhotoImage(r15)

r15btn = Button(root, image=r15, width=735, height=393, borderwidth=0,


highlightthickness=0, command = r15_choose)

r15btn.image = r15

r15btn.place(x=1000, y=400)
def bmw_bikes():

global S1000btn, R1250btn

S1000 = Image.open("k2yhofv.jpg")

S1000 = ImageTk.PhotoImage(S1000)

S1000btn = Button(root, width=735, height=450, borderwidth=0, image=S1000,


highlightthickness=0, command = s1000_choose)

S1000btn.image = S1000

S1000btn.place(x=200, y=400)

R1250 = Image.open("Recall-BMW-R1250GSA-adventure-motorcycle-768x512.jpg")

R1250 = ImageTk.PhotoImage(R1250)

R1250btn = Button(root, image=R1250, width=745, height=450, borderwidth=0,


highlightthickness=0, command = r1250_choose)

R1250btn.image = R1250

R1250btn.place(x=1000, y=400)

def kaw_bikes():

global Z900btn, ninjabtn

Z900 = Image.open("MY22-Kawasaki-Z900-priced-at-INR-8.5-lakh-new-colour-
launched_2.jpg")

Z900 = ImageTk.PhotoImage(Z900)

Z900btn = Button(root, width=735, height=393, borderwidth=0, image=Z900,


highlightthickness=0, command = z900_choose)

Z900btn.image = Z900

Z900btn.place(x=200, y=400)

ninja = Image.open("c11e049863cade39.jpg")

ninja = ImageTk.PhotoImage(ninja)
ninjabtn = Button(root, image=ninja, width=735, height=393, borderwidth=0,
highlightthickness=0, command = ninja_choose)

ninjabtn.image = ninja

ninjabtn.place(x=1000, y=400)

def RE_bikes():

global gt650btn, classicbtn

gt650 = Image.open("side-view.jpg")

gt650 = ImageTk.PhotoImage(gt650)

gt650btn = Button(root, width=735, height=393, borderwidth=0, image=gt650,


highlightthickness=0, command = gt650_choose)

gt650btn.image = gt650

gt650btn.place(x=200, y=400)

classic = Image.open("specifications-tribute-black.jpg")

classic = ImageTk.PhotoImage(classic)

classicbtn = Button(root, image=classic, width=735, height=393,


borderwidth=0, highlightthickness=0, command = classic_choose)

classicbtn.image = classic

classicbtn.place(x=1000, y=400)

def yama_click():

destroy_main()

choosebike()

yamaha_bikes()

def re_click():
destroy_main()

choosebike()

RE_bikes()

def bmw_click():

destroy_main()

choosebike()

bmw_bikes()

def kaw_click():

destroy_main()

choosebike()

kaw_bikes()

def rx100_choose():

ya_choose_option()

def r15_choose():

ya_choose_option()

def s1000_choose():

bmw_choose_option()

def r1250_choose():

bmw_choose_option()
def gt650_choose():

re_choose_option()

def classic_choose():

re_choose_option

def ninja_choose():

kw_choose_option

def z900_choose():

kw_choose_option

def ya_choose_option():

rx100btn.destroy()

r15btn.destroy()

repair_img = Image.open('repair-tools_427132.png')

repair_img = ImageTk.PhotoImage(repair_img)

repair_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=repair_img)

repair_btn.image = repair_img

repair_btn.place(x=225, y=300)

mod_img = Image.open('modify.png')

mod_img = ImageTk.PhotoImage(mod_img)

mod_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=mod_img)

mod_btn.image = mod_img

mod_btn.place(x = 1183, y = 300 )


choose_need()

def bmw_choose_option():

S1000btn.destroy()

R1250btn.destroy()

repair_img = Image.open('repair-tools_427132.png')

repair_img = ImageTk.PhotoImage(repair_img)

repair_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=repair_img)

repair_btn.image = repair_img

repair_btn.place(x=225, y=300)

mod_img = Image.open('modify.png')

mod_img = ImageTk.PhotoImage(mod_img)

mod_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=mod_img)

mod_btn.image = mod_img

mod_btn.place(x = 1183, y = 300 )

choose_need()

def kw_choose_option():

Z900btn.destroy()

ninjabtn.destroy()

repair_img = Image.open('repair-tools_427132.png')
repair_img = ImageTk.PhotoImage(repair_img)

repair_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=repair_img)

repair_btn.image = repair_img

repair_btn.place(x=225, y=300)

mod_img = Image.open('modify.png')

mod_img = ImageTk.PhotoImage(mod_img)

mod_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=mod_img)

mod_btn.image = mod_img

mod_btn.place(x = 1183, y = 300 )

choose_need()

def re_choose_option():

gt650btn.destroy()

classicbtn.destroy()

repair_img = Image.open('repair-tools_427132.png')

repair_img = ImageTk.PhotoImage(repair_img)

repair_btn = Button(root, width=512, height=512, borderwidth=0,


highlightthickness=0, image=repair_img)

repair_btn.image = repair_img

repair_btn.place(x=225, y=300)

mod_img = Image.open('modify.png')

mod_img = ImageTk.PhotoImage(mod_img)
mod_btn = Button(root, width=512, height=512, borderwidth=0,
highlightthickness=0, image=mod_img)

mod_btn.image = mod_img

mod_btn.place(x = 1183, y = 300 )

choose_need()

def choose_need():

bgcanvas.itemconfig(choose_bike, text = "Choose requirement")

repair = bgcanvas.create_text(420, 850, text="Repair", fill="white",


font=gen_font, anchor="w")

modify = bgcanvas.create_text(1378, 850, text="Modify", fill="white",


font=gen_font, anchor="w")

main_scn()

root.mainloop()

Output
Scope for Future Enhancement

 Addition of database to see previous requests


 Addition of home button to get to home page
 Addition of bike companies and models
 Addition of parts for each bike
 Addition in services delivered
Conclusion

Finishing up, Bike Mods and Spares is my first try at


making a virtual browser, taking ideas from real life pit
shops. Right now, it's got a basic look and a couple of
cool things. But it's not done yet. I'm planning to add
more features to make it even better. Thanks for
checking out my project!

You might also like