In pyton: In this lab, you will be building a software application that removes duplicate values from a list. The purpose of the assignment isto gain experience with user-defined functions, forloop and list manipulation.
In pyton:
In this lab, you will be building a software application that removes duplicate values from a list.
The purpose of the assignment isto gain experience with user-defined functions, forloop and list
manipulation.
Start
Start of remove duplicate function (numbers: list of numbers)
Initialize an empty list as new_list
Loop over each of the number of the numbers list
If number not in new_list
Append number to new_list
Return new_list
End of remove duplicate function
Start main function
Prompt user for list of numbers
Call remove duplicate function
Print the new list returned by the remove function
End of main function
End
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 1 images