Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Reliability Engineering Designing And Operating Resilient Database Systems

Authors: Laine Campbell, Charity Majors

1st Edition

978-1491925942

More Books

Students also viewed these Databases questions

Question

Th ey could have made my situation worse.

Answered: 1 week ago

Question

=+j on to staff their operations in the global marketplace.

Answered: 1 week ago