Untitled

mail@pastecode.io avatar
unknown
plain_text
a month ago
692 B
5
Indexable
Never
luck = input("Feeling luck today? (y/n) ")

if luck == "y":
    import random
    random.seed(1)
    print("You are " + str(random.randint(0, 100)) + "%" + " lucky today. Goodbye!")
elif luck == "n":
    boost = int(input("By how much do you want to boost your luck? Give a positive integer! "))
    if boost >= 0:
        import random
        luck_boost = int(random.randint(0, 100))
        final_luck = luck_boost + boost
        print("Your raw luck was " + str(luck_boost) + "%" + " ,boosted by " + str(boost) + "%\n" "You are " + str(final_luck) + " today. Goodbye!" )
    elif boost < 0:
        print("Invalid input:(")
        exit()
else:
    print("Invalid input :(")
    exit()  
Leave a Comment