Question: In Python code, can you please help with the following: Write a function called roll(num_loaded) that simulates rolling two dice at the same time. This

In Python code, can you please help with the following: Write a function called roll(num_loaded) that simulates rolling two dice at the same time. This function should have an input parameter that specifies as an optional argument the number of loaded dice (0, 1, or 2) that is used in the "roll". This function should return an integer from 2 to 12. Set the function input default to 0 so that when the command roll() is called, two fair dice are rolled.
My fair dice function is:
### fair_die function import random def fair_die(): one_dice = random.randint(1,6) return one_dice
My loaded die function in the works is:
import numpy as np dice = [1,2,3,4,5,6] np.random.choice(dice, p=[2/18, 2/18, 5/18, 5/18, 2/18, 2/18])
No Come Out Continuous Rolls Roll Play? Yes (Make Bet) Yes Yes (Natural) (Point Win) Point 7 or WIN Value? 11? No No Yes Yes (7-out) (Craps) 2, 3, LOSE or 12? Point Value Roll 4, 5, 6, 8, 9, 10
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
