English isnt m first language so understanding what exactly some errors mean is kinda hard, i triedd looking for answers and how to fix this error but i didnt find anything
this is the error : TypeError: unsupported operand type(s) for &: ‘int’ and ‘builtin_function_or_method’
and this is part of the code
while (chances != 0) and flag == 0:
print()
chances-= 1
try:
guess = str(input('Enter a letter to guess: '))
except:
print('Enter only a letter!')
continue
if not guess.isalpha():
print('Enter only a LETTER')
continue
elif len(guess) & gt >1:
print('Enter only a SINGLE letter')
continue
elif guess in letterGuessed:
print('You have already guessed that letter')
continue
if guess in word:
k = word.count(guess)
for _ in range(k):
letterGuessed += guess `try:
while (chances != 0) and flag == 0:
print()
chances-= 1
try:
guess = str(input('Enter a letter to guess: '))
except:
print('Enter only a letter!')
continue
if not guess.isalpha():
print('Enter only a LETTER')
continue
elif len(guess) & gt >1:
print('Enter only a SINGLE letter')
continue
elif guess in letterGuessed:
print('You have already guessed that letter')
continue
if guess in word:
k = word.count(guess)
for _ in range(k):
letterGuessed += guess```
As I said, its really hard to understand all of the errors and when i try to google it i dont really understand the answers as well, any help is appreciated:D
New contributor
xythrax is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.