So I have the line of code in python that I keep getting an error on.
Line of code:
input("This is your", movecounter, "move, type the number you want to move north")
Line 1 was just import random
Error:
File "<stdin>", line 1, in <module>
File "<stdin>", line 12, in berries
TypeError: input expected at most 1 arguments, got 3
How do I fix this? I don’t see any args???
At the least, you want to replace the commas with pluses and call
stronmovecounter(which I’m guessing is an integer).Arguments are separated by commas, so you were in fact giving
inputthree arguments.A more pythonic way of doing it is using
str.format:You could also use the old-style
%formatting operator as suggested by Kimvais, but I recommend learning and usingstr.format. It was made to supersede and improve upon the old%operator, which will eventually be deprecated. Many still use it though.