Question: Hello, I have this code written. I need to adapt this code: import random #allows Python to pick random numbers def lotteryNum(M): #defining the function
Hello,
I have this code written. I need to adapt this code:
import random #allows Python to pick random numbers
def lotteryNum(M): #defining the function lotteryPick=[] #Stores the lottery numbers if M=5: #if they are greater or equal to 5, lottery sample will pick through the range lotteryPick= random.sample(range(1,M+1),5) return lotteryPick
And fit it in with this code:
def main(): M=1 while M main() The first code needs to be inserted below "for n in range (1,nTrials+1): You should get the answer that looks like this: 
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
