"Takes No Keyword Arguments" Error In Python

Question:
So it is saying something about arguments but I have no idea why.
Error Pic:
image

while True:
  num1 = random.randint(0,10)
  num2 = random.randint(0,10)
  num3 = num1 + num2
  quest1 = input('\nHere are your first two numbers they are ',num1,' and ',num2,'.',' So you have',num3, '. Would you like a card?',sep='')

I don’t think you put multiple values in an input. So either use a print statement before the input or use an fstring.

5 Likes

You might be able to use this code example below

import random
while True:
  num1 = random.randint(0,10)
  num2 = random.randint(0,10)
  num3 = num1 + num2
  statement = '\nHere are your first two numbers they are '+str(num1)+"and"+str(num2)+"So you have" + str(num3) + "would you like a card"
  quest1 = input(statement)

There is no argument sep in the input function
image
it is exclusive to the print statement
image

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.