Answer the question
In order to leave comments, you need to log in
It gives an error AttributeError: module 'random' has no attribute 'randit' how to fix?
import random
number = random.randit(1,10)
for i in range(3):
a = int(input())
if a < number:
print("The hidden number is greater")
if a > number:
print("The hidden less than")
elif a == number:
print("You're out!")
break Traceback
error
(most recent call last):
File "C:\Users\521m\Desktop\pyth\a.py", line 3, in
number = random.randit(1,10)
AttributeError: module 'random' has no attribute 'randit'
Answer the question
In order to leave comments, you need to log in
import random
number =random.randint(1, 10)
for i in range(3):
a = int(input())
if a < number:
print("Загаданное число больше")
if a > number:
print("Загаданное число меньше")
elif a == number:
print("Вы вин!")
break
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question