This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Numpy is imported, seed is set | |
# Starting step | |
step = 50 | |
# Roll the dice | |
dice = np.random.randint(1,7) | |
# Finish the control construct | |
if dice <= 2 : | |
step = step - 1 | |
elif dice > 2 and dice < 6 : | |
step= step + 1 |
OlderNewer