Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Python list help! We are going to practice building some simple lists. Create a function called create_list. It takes 2 parameters, start and end both
Python list help!
We are going to practice building some simple lists. Create a function called create_list. It takes 2 parameters, start and end both are integers. This function should return a list that contains all the numbers from start, to end inclusive. So you'll need a loop to count and just append that number into your list and return it. (5 pts )
lst = create_list(5, 10)
lst would be [5, 6, 7, 8, 9, 10]
It should be able to go backwards too.
lst = create_list(10, 5)
lst would be [10, 9, 8, 7, 6, 5] Don't forget to give your function a docstring.( 1 pt )
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