Home » FLAMES game in Python

FLAMES game in Python

Java SE 11 Programmer I [1Z0-815] Practice Tests

The flames calculator is used to find the compatibility between you and your partner.

Flames stand for Friends, Lovers, Affectionate, Marriage, Enemies, Siblings. It is a famous game that used to be played by young girls. The game does not use any sort of algorithm or scientific method to predict whether an individual is perfect for someone or not, it's simply meant to be fun.

From a Python programming point of view it's a fun programming exercise and can show you a few techniques

We give 2 examples – a command line one and a GUI one.

Code example 1

 

When run with 2 random names

*** WELCOME TO THE FLAMES GAME ***

Enter name 1 (first name only) >>> william
Enter name 2 (first name only) >>> barbara

Flame name >>> WILLIMBRBARA

Compute FLAMES…

Now FLAMES
Now FLAME, striked out S
Now FAME, striked out L
Now FAM, striked out E
Now FA, striked out M
Now F, striked out A

FLAMES result: Friendship

Code example 2

A slightly different way to do it, this is a GUI version

 

 

You may also like

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More