In this article we will see how we can create a flames calculator using PyQt5. This flames calculator assesses and predicts the outcome of a relationship based on an algorithm of two given names.
FLAMES is a popular game named after the acronym: Friends, Lovers, Affectionate, Marriage, Enemies, Sibling. This game does not accurately predict whether or not an individual is right for you, but it can be fun to play this with your friends.
Below is how the flames calculator will look like
GUI implementation steps :
1. Create a label that says enter player 1 name and set color and geometry to it
2. Add QLineEdit widget in front of the first name label to get the first name
3. Similarly create another label that says enter player 2 name and set color and geometry to it
4. Add QLineEdit widget in front of this label to get the second name
5. Create a label to show the result and set its border, geometry and change its font.
6. Create a push button at the bottom which says get result.
Back end implementation steps :
1. Add action to the push button
2. Inside the push button action get both player names
3. Remove the spacing in between the names
4. Call the get result method that returns the result
5. Inside the get result method call the remove letter method that removes the common characters with their respective common occurrences.
6. Then get the count of characters that are left and take FLAMES letters as [“F”, “L”, “A”, “M”, “E”, “S”]
7. Start removing letter using the count we got. The letter which last the process is the result, return the result
8. Set the result to the label using setText method.
Below is the implementation
- Python | Program to implement simple FLAMES game
- Python | Simple FLAMES game using Tkinter
- Building Calculator using PyQt5 in Python
- PyQt5 - Calculator for Number of seconds You have Lived
- PyQt5 - Percentile Calculator
- PyQt5 - Age Nearest Birthday Calculator
- PyQt5 - Average Speed Calculator
- PyQt5 - Beats and Breaths Calculator
- Loan Calculator using PyQt5 in Python
- 1/4 Mile Calculator using PyQt5 in Python
- PyQt5 - Days From Date Calculator
- Dog Years Calculator using PyQt5
- Creating Golden Ratio Calculator using PyQt5
- Silver Ratio Calculator using PyQt5
- Ratio Calculator using PyQt5
- Aspect Ratio Calculator using PyQt5
- Basic calculator program using Python
- Python | Simple GUI calculator using Tkinter
- Python | Distance-time GUI calculator using Tkinter
- Python | Simple calculator using Tkinter
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to email@example.com. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.