filmov
tv
Number Guessing Game | AI | Python #programming #python #ai

Показать описание
Can we say this is AI? Comment it
I came across this in my Comp Sci class. We had a lesson on AI from our Sir.
Here is the Code-
import random, time
top=1000
low=1
while True:
if number==guess:
print('You won!',number)
break
elif number is greater than guess:
print('Higher than,',guess)
low=guess
elif guess is greater than number:
print('Lowe than,',guess)
top=guess
guess=guess2
I came across this in my Comp Sci class. We had a lesson on AI from our Sir.
Here is the Code-
import random, time
top=1000
low=1
while True:
if number==guess:
print('You won!',number)
break
elif number is greater than guess:
print('Higher than,',guess)
low=guess
elif guess is greater than number:
print('Lowe than,',guess)
top=guess
guess=guess2