Solved by verified expert:Unit F take-home assignmentAt the top of each of your problems put the following multi-line comment, with your information:”’ Your name as registered, with optional nickname in parentheses CIS 41A Fall 2017 Unit F take-home assignment ”’This assignment consists of three separate scripts.All three scripts should consist of a main function that includes a call to a function that includes the code.First script – Swapping List Elements:Create a list called list1 and populate it with the numbers 1,2,3. Create a second list called list2 and populate it with the numbers 4,5,6. Swap the first numbers of each list with each other using ONE line of code. Print the two lists.Sample Execution Results:[4, 2, 3]
[1, 5, 6]
Second Script – Variable-Length Arguments:Write a printGroupMembers function. The function prints a list of students who are working together on a group project, as well as the group name. The function has one required argument, the group name, and one variable-length argument that contains the student names. – see: arbitrary number of parameters (scroll down to the section called Arbitrary Number of Parameters) The Python documentation also has a less complete explanation at: unpacking-argument-listsFirst test: Call as follows: printGroupMembers(“Group A”, “Li”, “Audry”, “Jia”) Second test: Create a list as follows: groupB = [“Group B”, “Sasha”, “Migel”, “Tanya”, “Hiroto”] and then call the function using this list.Sample Execution Results:Members of Group A
Li
Audry
Jia
Third Script: – List Comprehensions:List comprehensions are an extremely powerful feature of Python. Essentially, they are a way to transform or filter an existing list. See this excellent introduction: list comprehensions List comprehensions can be thought of as building on, or even being an alternate to Pythons lambda, map, filter and reduce functionality – see: Lambda We are going to proceed straight to writing a list comprehension (you don’t need to have an understanding of these Python features, but they are mentioned here for the sake of completeness).We will be calculating the year-end balances in a bank account that earns interest continuously over a period of 6 years. The beginning balance of the account is $1,000.00, and it earns 5% continuous interest. Continuously compounding interest is calculated as shown here: continuously compounding interest You will need to import Python’s math module and use the mathematical constant e – see: math constants Hint: the list you will be transforming is a list of the years 1,2,3,4,5,6. If you get stuck, try writing the code as just a for loop. Once you have that working, then try converting the loop to a list comprehension. Print the transformed list, rounded to the nearest cent (round in the list comprehension, not in the print).Sample Execution Results:[1051.27, 1105.17, 1161.83, … etc.For each script add the following at the end, showing your results:”’ Execution results: paste execution results here ”’ Print and staple together the three scripts, including the execution results, and turn them in.
You will get a plagiarism-free paper and you can get an originality report upon request.
All the personal information is confidential and we have 100% safe payment methods. We also guarantee good grades
Delivering a high-quality product at a reasonable price is not enough anymore.
That’s why we have developed 5 beneficial guarantees that will make your experience with our service enjoyable, easy, and safe.
You have to be 100% sure of the quality of your product to give a money-back guarantee. This describes us perfectly. Make sure that this guarantee is totally transparent.
Read moreEach paper is composed from scratch, according to your instructions. It is then checked by our plagiarism-detection software. There is no gap where plagiarism could squeeze in.
Read moreThanks to our free revisions, there is no way for you to be unsatisfied. We will work on your paper until you are completely happy with the result.
Read moreYour email is safe, as we store it according to international data protection rules. Your bank details are secure, as we use only reliable payment systems.
Read moreBy sending us your money, you buy the service we provide. Check out our terms and conditions if you prefer business talks to be laid out in official language.
Read more