Question: USING PYTHON List Comprehension - Numbers. Write a program that has at least 2 functions. The first function would ask for a user to enter

USING PYTHON

List Comprehension - Numbers. Write a program that has at least 2 functions. The first function would ask for a user to enter an integer number and it will save the number into a list then ask for next integer number to append to the list. Continue the process of integer number entry until user enter -1 to stop data entry into the list. The function should return the list of integer numbers entered by user.

The second function will take the list of integer numbers as an input argument and performs the list sorting in descending order by their last digit and print that sorted list. (Use list comprehension)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock 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 Databases Questions!