Code:
import random
print('hello, pls give me ur wish and me will tell how many % it will happen.')
wish = input()
percentage = random.randint(1, 100)
print('ok, ' + wish + ', let us see.....')
print(percentage,"% that you is")
if (percentage <= 75) :
boop = "wow is very high for happen"
elif (percentage <= 50) :
boop = "hmmm, is will happen maybe"
elif (percentage <= 25) :
boop = "low chance of happen, is will might no happen"
elif (percentage <= 1) :
boop = "very low, wish u lucc"
elif (percentage == 0) :
boop = "too bad so sad, is no happen"
print(boop)
I tried running the code, it work but the result is not what i was expecting it to be:
I want to fly.
ok, I want to fly., let us see.....
28 % that you is
wow is very high for happen
>>>
The percentage is 28% and it should say "low chance of happen, is will might no happen" but instead, it says "wow is very high for happen". If someone could help me, please do.
Aucun commentaire:
Enregistrer un commentaire