45.1k views
4 votes
Write a function that takes a list as a parameter, converts every element in the list to integar and then returns a tuple comprising of these integar elements. If the function encounters a character such as 'p' that cannot be converted to an integar, it throws this error message on the screen: "Error. Please enter only integers."

1 Answer

2 votes

Answer:

Following is given the solution of your question as required.

All the necessary descriptions are given in form of comments,

Sample output are also shown.

I hope it will help you!

Step-by-step explanation:

Write a function that takes a list as a parameter, converts every element in the list-example-1
Write a function that takes a list as a parameter, converts every element in the list-example-2
User Acha Bill
by
6.3k points