0
Always True or False. How to fix it?
print ('Letter guessing game!') def checkGuess(): print('Guess a letter!') a = True guess = bool(input()) if guess == a: print ('Correct! You win!') else: print ('Wrong') if checkGuess() == False: [checkGuess() for _ in range(0,2)] else: pass I notice when i entered "if guess = ''a'': " Then its always wrong. Why is this? and if i just put 'a' its always true ><
2 Respostas
+ 4
print ('Letter guessing game!')
def checkGuess():
print('Guess a letter!')
guess = str(input())
if guess == 'a':
print ('Correct! You win!')
else:
print ('Wrong')
if checkGuess():
[checkGuess() for _ in range(0,2)]
else:
pass
0
try doing: if guess=='a'