Ask coding questions

← Back to all posts
Confused About Error
OscarSowerbutts (9)

When I run my Python code an error appears almost straightaway. The program is meant to be a game in which you guess a word and then get points if your word has one of the random letters.
I don't quite understand the error, PLZ HELP INTERNET

Comments
hotnewtop
Coder100 (18207)

input Is. An argument, not a function anymore because of line 12. Line 12 told python it has value True now, so just rename input argument and don't forget to change line 14 too.

[deleted]

It’s because the Boolean object isn’t call able. You should change the parameter input to like iput or something you remember

ch1ck3n (2076)

you overrode the function input with a boolean. change

def printPoints(points, tinput = True):
	print('\nPoints: %s\n' % points)
	if tinput == True:

or smth like that.

BananaJellyfish (210)

Im fairly sure its something to do with when you define printPoints, it has input = True but im not sure.