Write a Python script below that matches the followingalgorithm.
- Create an empty list.
- Repeatedly get a name from the user, and add that name to theend of the list (use the list append method), until the user entersa ‘q’.
- Display each name in the list on a line by itself.
- Display a message that indicates how many names are in thelist.
- Initialize a counter to 0.
- Loop through the list and each time a name in the list has alength greater than 6, add 1 to the counter.
- Display a message that indicates how many long names are in thelist (i.e., have a length greater than 6).
Answer to Write a Python script below that matches the following algorithm. Create an empty list. Repeatedly get a name from the u…