有人可以帮助我了解我收到的此键盘错误吗?我一直用头撞了45分钟,却一无所获。我敢肯定这很简单,但是我没有看到问题。我希望有人能对我有所了解。
Die_Generator
while True:
user_input1 = input('Select die to roll: ').upper()
print("check1")
selected_die = sd.die_selector(user_input1)
print("check2")
# Choose your dice quantity
user_input2 = input('Select die quantity to roll: ').upper()
print("check3")
selected_quantity = sq.quantity_selector(user_input2)
print("check4")
# Calculate your roll(s)
calculation = ca.calc(user_input1, user_input2)
计算
import Data
import random
def calc(inp1: object, inp2: object) -> object:
i = 1
while i <= int(inp2):
print('Rolling' + ' ' + str(inp2) + ' ' +
str(inp1))
while i <= int(inp2):
out1 = (
'Die ' + str(i) + ' = ' +
str(random.randrange(1, int(Data.Die_Available[str(inp2)]))))
i += 1
return out1