Question: [Python] (20 pts) Write a Python function, ListNames, that keeps asking the user to input an undetermined number of names and creates a growing Python
[Python]![[Python] (20 pts) Write a Python function, ListNames, that keeps asking](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f32e5da56ff_14866f32e5cdd9a2.jpg)
(20 pts) Write a Python function, ListNames, that keeps asking the user to input an undetermined number of names and creates a growing Python list of these names. Once the user enters 'q' or 'Q at the input prompt, however, the program stops asking for names and instead prints out the message: "You entered N names." (where Nis the number of people the user entered). The function returns the Python list of names in alphabetical order. That last 'q' or Q entry should not be counted towards the calculation of N and should not be in the final returned list. Submit the answer to this question as a print out on a separate attached (stapled) sheet to this homework. 1. 2, (20 pts) Consider X(n), a sum of numbers in the following infinite series: 2+5 +811 14+ 17 +... etc Write TWO Python functions: SeriesX1 and SeriesX2, where SeriesX1(n) calculates the value of the sum up until the nth position (assume the first position is position 0) using a recursive function approach, and where SeriesX2(n) does so using a while loop. Submit the answer to this question as a print out on a separate attached (stapled) sheet to this
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
