+ 1

How do I make it print the same value whenever a particular Input is entered?

print ("welcome to Ace's Love calculator") print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") import random for i in range(1): value = random.randint(0,100) a=input("enter your name \n") print ("welcome", a) print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") b=input("enter your chic's name\n") print ("welcome ", b) print("~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~") print ("Dear", a, "your compatibility with", b, "is:", value, "%")

13th Oct 2017, 8:33 PM
Joelsays
Joelsays - avatar
2 Réponses
+ 1
You have to stop using random function. And make some kind of formula.
13th Oct 2017, 8:40 PM
Ahmed Mudhafar Mohsin
Ahmed Mudhafar Mohsin - avatar
0
Replace random with some hashcode-style combination.
13th Oct 2017, 11:02 PM
Max Ement
Max Ement - avatar