Python Error – TypeError: input expected at most 1 arguments, got 3

Python Error – TypeError: input expected at most 1 arguments, got 3

You got that error because you in fact gave 3 arguments to the input function when it was only expecting 1 (namely, a string prompt).

In input (What was your favorite part of the book,, your_name, ?)
           ---------------------------------------- , ---------, ---

The underlined parts are the comma-separated arguments: a string (What is ….book, a variable your_name, and another string, ?

I think what you wanted was

goal = input(What was your favorite part of the book,  + your_name + ?)

Here the concatenation operator + combines those ingredients into a single string — and a string is the one argument that input is expecting

Try this:

goal = input (What was your favorite part of the book, %s ? % your_name)

enter

Python Error – TypeError: input expected at most 1 arguments, got 3

input(print(What was your favorite part of the book,  + your_name + ?))

Related posts

Leave a Reply

Your email address will not be published. Required fields are marked *