Python expected one argument, found three, what is the proper syntax? -


for example...

day=1  question=int(input("how many cookies did eat on day number", day, " ?")) 

and in loop, i've got day=day+1 so, when repeats, asks day 1, 2, 3...

i understand not correct syntax, obviously, because python keeps refusing saying expected 1 argument , got three. how set up?

use string formatting:

input("how many cookies did eat on day number {}?".format(day)) 

Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -