lundi 18 février 2019

Why is my if statement is always triggering in python

I'm new to python and I decided to do a project by myself. In my project there is a if statement that always triggers. Also i'm still learning pip8, so tell me if I violated it.

yn = input('Do you need me to explain the rules. Y/N: ').lower()
if yn == 'y' or 'yes':
    print('I will think of a number between 1 - 100.')
    print('You will guess a number and I will tell you if it is higher or lower than my number.')
    print('This repeats until you guess my number.')

Aucun commentaire:

Enregistrer un commentaire