Обновлено по комментариям:
Я только что создал рабочую версию вашей программы, ваш ввод будет 1, и компьютер будет случайным образом угадывать 1,2,3, пока не даст правильный ответ.
#input = var this line is wrong as pointed out by others
input = 1 # this is your input number
x = 0
counter = 0
import random
while x == 0:
#from random import * this will import too much in the while loop according to comments
#randint(1, 3) this line is wrong
randint = random.randint(1, 3) # computer guess from 1-3, then you should assign random generated number to randint
print(randint)
# if randint == var: this line is wrong, you can't compare randint to var.
if randint == input: #
x = 1
count = counter + 1
print(counter)
print("Good Bye!")
else:
x = 0
counter = counter + 1
print(counter)
выход:
3
1
1
1
Good Bye!
Process finished with exit code 0