Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PYTHON Write a function called reverse_list 1. Takes a list with 5 elements as an input 2. Create a new empty list 3. Fill the

PYTHON Write a function called reverse_list 1. Takes a list with 5 elements as an input 2. Create a new empty list 3. Fill the new empty list with the input list values in reverse order 4. Return the new list ii. Define a list called numbers with 5 numbers [1, 2, 3, 4, 5] iii. Print the numbers list iv. Call the reverse_list function passing in the numbers list v. Print the output of the reverse_list function vi. Print the numbers list again c. BUILT-IN FUNCTION i. Using a built-in list function, reverse values in the numbers list ii. Print the numbers list again d. Write comments in the file to answer the following questions i. What does your function do? ii. What does the built-in function do? iii. Does your function behave differently than the built-in function? If yes, how?

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

Oracle Database 11g SQL

Authors: Jason Price

1st Edition

0071498508, 978-0071498500

More Books

Students also viewed these Databases questions