Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Please choose ONLY one of your team members name and CWID to do the following questions Let 'Num' represent your first and last digits of
Please choose ONLY one of your team members name and CWID to do the following questions Let 'Num' represent your first and last digits of CWID. For example: if your CWID is 11699999 then Num-19 1. (5 points) Use For Loop to create a list: nameList - FirstName LastNamel', First Name LastName2', . .., 'FirstName LastNameNum' and print the nameList. For instance, suppose your name - 'Ming Xing', and CWID 11699999, and thus Num-19. So, nameList = ['Ming-Xingl, ,Ming-Xing2 , ,Ming-Xing19] 2. (5 points) Define a function: f(n) - n!+2n, and then compute f (Num) and print its result. 3. (5 points) Write code that prints f(Num), then prints f(Num-1), then prints f(Num-2), then prints1). Its literal outpuw be: The function value of Num is: f(Num) The function value of Num-1 is: f(Num-1) The function value of 1 is: f(1) Note: keep in mind that Numi is a specific value; suppose Num 19 and then Num-1-18 4. (5 points) Compute f(1) +f(2) .f(Num) and print its result Submission instruction: . Your submission should contain two files: 1. Python code file; 2. Your results output (copy your results into a word file, and also list all your team members' name in this word file)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started