Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Write a function named create_list that takes in a list size and returns a list of random numbers from 1-6. i.e., calling create_list(5) should return
Write a function named create_list that takes in a list size and returns a list of random numbers from 1-6. i.e., calling create_list(5) should return 5 random numbers from 1-6. (Remember, Chapter 7 has code showing how to do something similar, creating a list out of five numbers the user enters. Here, you need to create random numbers rather than ask the user.) To test, use this code against the function you wrote:
my_list = create_list(5) print(my_list) |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started