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

Write a function that generates a list with 15 random integer values

Write a function 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 exercise2 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 exercise5 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

1 Expert Approved Answer
Step: 1 Unlock

Exercise 1 import random def generaterandomlist return randomrandint1 100 for in range15 ... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!