我正在尝试使用numpy生成随机数,但它只会打印6和50而不是随机数
# Import Python package
import numpy as np
# Set seed
np.random.seed(123)
steps = 50
# Roll the Dice
dice = np.random.randint(1, 7)
# Control construct
if dice <= 2:
steps = steps - 1
elif dice >= 3 and dice <= 5:
steps = steps + 1
else:
dice + np.random.randint(1, 7)
# Print out dice and step
print(dice)
print(steps)