Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a function called exercise 1 that generates a list with 15 random integer values ranging from 1 to 100 . The function should return

image text in transcribed

Write a function called exercise 1 that generates a list with 15 random integer values ranging from 1 to 100 . The function should return the list with all the values. Exercise 2 Write a function called exercise 2 that receives 2 arguments: the first will be the list that we have implemented in Exercise 1 and the second a number by which each of the elements of the list will be divided. The result will be a new list. Exercise 3 Assign a variable called exercise3 an anonymous function. Such a function must create a new list containing only the integer values of each of the list elements returned by the function implemented for exercise 2. Exercise 4 Implement a function, called exercise4, that receives two integers as arguments and returns the following values in a tuple: the factorial of the first argument and the greatest common divisor of both arguments. Exercise 5 Create a function exercise 5 that returns a list with all the values contained in a list that is passed by argument but removing the repeated values. Test the operation of this function with the list obtained in Exercise 1

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

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

6. What actions might make employers lose elections?

Answered: 1 week ago

Question

Why does sin 2x + cos2x =1 ?

Answered: 1 week ago

Question

What are DNA and RNA and what is the difference between them?

Answered: 1 week ago

Question

Why do living creatures die? Can it be proved that they are reborn?

Answered: 1 week ago