Skip to main content

How to make a shopping app | Make shoping app using python




Shopping app in python

Hello coders. Well we can see that how technology is growing in this world. In this modern age we are roughly using internet and other technology. Shopping is a part of our life many of us do shoping in online. But some time it take so much time so we need to go to our local shop to purcahse our items. So you need to make a list of your items. Also you may see that shop keeper create a tic mark on the list of your items so you and shop keeper be sure that the item has checked. Our app gonna make this task so easy for you as well as shop keeper. So ready for code

Required module

In this project we will use a famouse module for GUI application called tkinter.

Install tkinter

Simply use the commond pip install tkinter to install tkinter in python

Now import the module

from tkinter import *

Create a root variable

root = Tk()

Source code

Now you have all set to make the application 

from tkinter import *
root = Tk()

# the function for user desire shoping list
def user_desire():
    x = int(take_value.get())
    Label(root,text="Make your list"font="comicsansms 10 bold").grid(row=4,column=4)
    for i in range(0,x):
        Entry(root,bg="green").grid(row=i+5,column=4)
        Checkbutton(root,bg="green").grid(row=i+5,column=1)

    


root.geometry("570x400")
Heading = Label(roottext="Wellcome to shoping app"font="comicsansms 33 bold"bg="purple")
Heading.grid(row=0,column=4)
root.configure(bg="orange")

# ask customer how many items they want to purchase
f1 = Frame(root,borderwidth=3relief=SUNKENbg="red")
f1.grid(row=1,column=4)
l1 = Label(f1text="How many items you want to purchase",bg="yellow")
l1.grid(row=1column=4)

# take user input for the number of items
take_value = StringVar() #a variable to store the value of the user input
f2 = Frame(root,borderwidth=2width=5,relief=SUNKEN)
f2.grid(row=2,column=4)
user_input = Entry(f2,bg="red",textvariable=take_value)
user_input.grid()

# the number of box they want for their shoping list
Button(roottext="Submit"command=user_desire).grid(row=3column=4)

root.mainloop()

See the result

See the result of the code in my insta page https://www.instagram.com/python.math/

Hope you find it helpfull and you like it. Please supprot me so I can make more projects for you🙏🙏🙏


Comments

Popular posts from this blog

Create Ping Pong Game in Python

  Ping Pong Game: Table tennis , also known as  ping-pong  and  whiff-whaff , is a sport in which two or four players hit a lightweight ball, also known as the ping-pong ball, back and forth across a table using small rackets. The game takes place on a hard table divided by a net. Except for the initial serve, the rules are generally as follows: players must allow a ball played toward them to bounce once on their side of the table and must return it so that it bounces on the opposite side at least once. A point is scored when a player fails to return the ball within the rules. Play is fast and demands quick reactions. Spinning the ball alters its trajectory and limits an opponent's options, giving the hitter a great advantage. We can make it using pygame but I keep it more simple we will create this game using only the turtle module so let's drive into the code without wasting any time Code: # Import required library import turtle # Create screen sc = turtle . Screen () sc .

Draw Minecraft Charater in Python

  Minecraft  is a  sandbox video game  developed by the Swedish video game developer  Mojang Studios . The game was created by  Markus "Notch" Persson  in the  Java programming language . Following several early private testing versions, it was first made public in May 2009 before fully releasing in November 2011, with  Jens Bergensten  then taking over development.  Minecraft  has since been ported to several other platforms and is the  best-selling video game of all time , with over 238 million copies sold and nearly 140 million  monthly active users  as of 2021 . We gonna build a character of Minecraft using our creativity and coding skills so let's drive into the code: Code: import turtle as t def eye ( r , a ):     t . fillcolor ( 'brown' )     t . begin_fill ()     t . circle ( r , a )     t . end_fill () t . begin_fill () t . fillcolor ( '#8a00e6' ) t . penup () t . goto ( 0 ,- 50 ) t . pendown () t . right ( 90 ) t . f

How To Draw BMW Logo - In Python

 I know I don't need to introduce BMW as it is a very popular luxury car. Today we gonna draw the BMW logo in python. I know that you can draw it using a pencil and other tools like AutoCAD etc. But we are programmers we talk with computers so let's tell our computer to draw this logo for use with the help of python. Module The only module we will use is that turtle Code: import turtle as t t.begin_fill() t.fillcolor( '#008ac9' ) for i in range ( 50 ):     t.forward( 4 )     t.left( 2 ) t.right(- 80 ) t.forward( 116 ) t.right(- 90 ) t.forward( 132 ) t.end_fill() t.penup() t.pendown() t.right( 90 ) for i in range ( 50 ):     t.forward( 4 )     t.left(- 2 ) t.right( 80 ) t.forward( 116 ) t.forward(- 116 ) t.right( 90 ) t.begin_fill() t.fillcolor( '#008ac9' ) for j in range ( 45 ):     t.forward(- 4 )     t.left(- 2 ) t.right(- 90 ) t.forward( 116 ) t.end_fill() t.right( 180 ) t.forward( 116 ) t.right( 90 ) for i in range ( 47 ):     t.forward( 4 )     t.