Coder Social home page Coder Social logo

problemsolvewithridoy / love-calculator Goto Github PK

View Code? Open in Web Editor NEW
5.0 1.0 0.0 112 KB

This is a Love Calculator project written in Python with an amazing GUI using the tkinter library. The project asks the user to input their name and the name of their crush, and then calculates a love percentage based on a simple algorithm. The result is displayed on the GUI, along with a funny message based on the love percentage.

License: MIT License

Python 100.00%
calculator love-calculator love-calculator-python love-calculator-using-python python python-calculator python-love calculator-for-love python-love-calculator

love-calculator's Introduction

Love Calculator

This is a Love Calculator project written in Python with an amazing GUI using the tkinter library. The project asks the user to input their name and the name of their crush, and then calculates a love percentage based on a simple algorithm. The result is displayed on the GUI, along with a funny message based on the love percentage.

The project is a great way to practice your Python programming skills, especially if you're interested in creating GUI applications. The code is well-commented and easy to understand, so it's a good starting point for beginners who want to learn more about Python and GUI development.

Feel free to download the code and customize it to your liking. If you find any bugs or have suggestions for improvement, please open an issue on the repository. Happy coding!

To make this project you need to follow this step:-

Installation

Install package with pip

  pip install tkinter

Deployment

To deploy this project run

# Python Tkinter GUI based "LOVE CALCULATOR" by "Problem solve with Ridoy"

import tkinter
from tkinter import *
import random
from PIL import ImageTk, Image

root = Tk()
root.geometry('400x240')
root.title('Love Calculator')

img = (Image.open("love.png"))
image1 = img.resize((100, 100), Image.ANTIALIAS)
test = ImageTk.PhotoImage(image1)


label = tkinter.Label(image=test)
label.image = test

label.pack()


def calculate_love():
    st = '0123456789'
    digit = 2
    temp = "".join(random.sample(st, digit))
    result.config(text=temp)

heading = Label(root, text='Love Calculator made by "Problem solve with Ridoy"')
heading.pack()

slot1 = Label(root, text="Enter Your Name:")
slot1.pack()
name1 = Entry(root, border=5)
name1.pack()

slot2 = Label(root, text="Enter Your Partner Name:")
slot2.pack()
name2 = Entry(root, border=5)
name2.pack()

bt = Button(root, text="Calculate", height=1, width=7, command=calculate_love)
bt.pack()

result = Label(root, text='Love Percentage between both of You:')
result.pack()

root.mainloop() 

Output

output

You can follow me

Facebook:- https://www.facebook.com/problemsolvewithridoy/

Linkedin:- https://www.linkedin.com/in/ridoyhossain/

YouTube:- https://www.youtube.com/@problemsolvewithridoy

If you have any confusion, please feel free to contact me. Thank you

love-calculator's People

Contributors

problemsolvewithridoy avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.