ので、Pythonの初心者をIMと私はそうのようにランダムに入力varibleを配置する方法を見つけるカント、Variblesをランダムに使用しますか? (パイソン)
import time
import random
choice = input('easy (max of 100 number), medium(max of 1000) or hard (max of 5000)? Or custom)')
time.sleep(2)
if choice == 'custom':
cus = input(' max number?')
print ('okey dokey!')
eh = 1
cuss = random.randrange(0, (cus))
easy = random.randint(0, 100)
medium = random.randint(0, 1000)
hard = random.randint (0, 5000)
if choice == 'easy' or 'medium' or 'hard' or cus:
while eh == 1:
esy = int(input('what do you think the number is?)'))
if esy > easy:
time.sleep(2)
print ('too high!')
elif esy == easy:
print (' CORRECT!')
break
elif esy < easy:
print ('TOO low')
は私がその数を置くことができますどのような方法があります誰かが9行目のようにランダムに入力したものですか?
あなたの角括弧を削除し、 '(0、int(cus)) 'を使用してください – AK47