これは私の現在のコードです:
import random
while True:
try:
num = int(input("Enter the total number of digits you want to generate:"))
upper = int(input("Enter your highest number:"))
lower = int(input("Enter your lowest number:"))
if upper < 1 or lower < 1 or upper <= lower:
print ("Sorry, invalid. Make sure your upper bound is higher than lower bound, make sure all numbers are integers greater than 0.")
continue
if num < 1:
print ("Sorry, invalid. Try again.")
continue
**mylist = [0] * num
for x in range (lower, upper):**
このすぐ上の部分は、先に進む方法がよくわからない部分です。ユーザーが入力した数値に応じて、ユーザーがここに表示されるリストに入力した上限と下限の範囲内で乱数を生成したいと考えています。誰かがこれを案内してくれますか? ありがとう!
except:
print ("Sorry, invalid. Try again.")
else:
print ("Thank you.")
break