This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Samran
Recipients Samran
Date 2020-07-29.16:30:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1596040245.85.0.344075232599.issue41436@roundup.psfhosted.org>
In-reply-to
Content
#this is the code

from random import randint

num = randint(1,10)

print(type(num))

print(num)

ch = None                                                                                           #tried changing this tried converting types

guess = 0

print(type(guess))

print("Welcome to guessing game: ")

 

 

while ch != 'n' or ch != 'N':                                            #here is the bug this statement is not running. It works with “and”

                while( guess != num):

                                guess = int(input("Enter your guess?  "))

                                if guess == num:

                                                print("You Guessed Congratz")

               

 

                ch=input("Enter 'y' to play or 'n' to exit: ")

               

 

                if ch=='y' or ch == 'Y':

                                guess= 0

                                num = randint(1,10)

 

print("Thankyou for playing.")
History
Date User Action Args
2020-07-29 16:30:45Samransetrecipients: + Samran
2020-07-29 16:30:45Samransetmessageid: <1596040245.85.0.344075232599.issue41436@roundup.psfhosted.org>
2020-07-29 16:30:45Samranlinkissue41436 messages
2020-07-29 16:30:45Samrancreate