Jennifer
0
Q:

how to deal with this in python AttributeError: 'int' object has no attribute 'counter'

num1 = random.randint(0,12)
num2 = random.randint(0,12)



num = print(num1,"x",num2) 
answer = int(input("what are theses 2 numbers x together  "))
answer.counter
while num1 * num2 == answer or counter > 5 :
  #  num1 = random.randint(0,12)
    num2 = random.randint(0,12)
    
    print("well done you got it correct ")
    counter +1
    print(counter)
    num = print(num1,"x",num2) 
    answer = int(input("what are theses 2 numbers x together  "))
    


else:
    print("you are out of turns game over")
    print(counter)


    
0
AttributeError: 'int' object has no attribute 'counter'
0

New to Communities?

Join the community