Design a program which uses functions to sort a list and perform a binary search. Your program should:
Iinitialize an unsorted list (using the list provided)
Display the unsorted list
Sort the list
Display the sorted list.
Set up a loop to ask the user for a name, perform a binary search, and then report if the name is in the list. Use a sentinel value to end the loop.
Do not use the Python built in sort function to sort the list, instead write one or more functions to implement either the bubble sort or insertion sort (you choose the one you want to implement). The algorithms for the bubble sort and insertion sort are provided in the Word document attachment.
Implement the binary search algorithm as a function. Algorithms are provided in the Word document attachment for an iterative version or recursive version of the binary search. You choose the one you want to implement.
Use this test list: [ 'Paul', 'Aaron', 'Jacob', 'James', 'Bill', 'Sara', 'Cathy', 'Barbara', 'Amy', 'Jill' ]
Turn in your source code with IPO comments at the top of the file
A screen shot showing the results of your testing.
In: Computer Science
A new development is being planned, which will connect to the city ’s sanitary sewer system. This development will have 80 acres of medium-density residential assume 10 DU / acre and 2.8 persons per DU). Assume a per capita sewage rate of 90 gal/d/person. Additionally, a new community hospital will be constructed with 300 beds (assume 300 gal/d/bed). Assume I/I contribution of 10%.
a. Calculate the mean sewer discharge (accounting for residential, commercial, and I/I flows).
b. Calculate the maximum sewer discharge. Assume a peaking factor of 3.0
c. The new sanitary sewer pipe is to be laid at a slope of 0.003 ft/ft and built with pre -cast concrete pipe (n = 0.013). C ity code requires that the pipe can transmit the peak flo w at 75% full, with a velocity between 1.5 and 10 ft/s. What diameter pipe would you use?
d. How full, in inches, will the pipe be under normal conditions (mean discharge)?
In: Civil Engineering
Question This case is based on an actual situation. Centennial Construction Company, headquartered in Dallas, Texas, built a Rodeway Motel 35 miles north of Dallas. The construction foreman, whose name was Slim Chance, hired the 40 workers needed to complete the project. Slim had the construction workers fill out the necessary tax forms, and he sent their documents to the home office. Work on the motel began on April 1 and ended September 1. Each week,Slim filled out a time card of hours worked by each employee during the week. Slim faxed the time cards to the home office, which prepared the payroll checks on Friday morning. Slim drove to the home office on Friday, picked up the payroll checks, and returned to the construction site. At 5 p.m. on Friday, Slim distributed payroll checks to the workers.
Requirements
1. Describe in detail the main internal control weakness in this situation. Specify what negative result(s) could occur because of the internal control weakness.
2. Describe what you would do to correct the internal control weakness.
In: Accounting
Assignment No. 3.4
PROBLEM: Suppose you are the administrator in charge of setting the toll for crossing a toll bridge across a river. The current toll is $1 per trip and at that toll 1000 trips per hour are taken across the bridge. (a) If the price elasticity of demand for trips is 2.0, what will happen to the number of trips taken per hour if you raise the toll by 10 percent? How would this affect the total revenue collected per hour?(b) If the price elasticity of demand for trips is 0.5, what will happen to the number of trips taken per hour if you raise the toll by 10 percent? How would this affect the total revenue collected per hour?(c) Other things equal, at the current toll of $1, what do you think will happen to the elasticity of demand for trips, if the average incomes of people who use the bridge rise? Explain why.(d) Other things equal, at the current toll of $1, what do you think will happen to the elasticity of demand for trips if a non-toll bridge is built a few miles up the river? Explain why.
In: Economics
**Do not round in this problem. Use at least 5 significant figures.
A large entertainment company, let’s call them Wisney! Ok, so Wisney is considering buying a new piece of land in the Everglades and planning to put a new campground…but make it fun! The land they are buying has a stipulation that nothing can be built on the property until it is paid in full. Wisney is wealthy and has cash available but due to COVID-19 is being a bit more conservative about spending large amounts of money on new projects, therefore they will take out a loan with a nominal rate of 4.78%.
In: Economics
In: Economics
CAPITAL BUDGETING CRITERIA: ETHICAL CONSIDERATIONS An electric utility is considering a new power plant in northern Arizona. Power from the plant would be sold in the Phoenix area, where it is badly needed. Because the firm has received a permit, the plant would be legal, but it would cause some air pollution. The company could spend an additional $40 million at Year 0 to mitigate the environmental problem, but it would not be required to do so. The plant without mitigation would require an initial outlay of $240 million, and the expected cash inflows would be $80 million per year for 5 years. If the firm does invest in mitigation, the annual inflows would be $84 million. Unemployment in the area where the plant would be built is high, and the plant would provide about 350 good jobs. The risk-adjusted WACC is 17%.
Calculate the NPV and IRR with and without mitigation.
How should the environmental effects be dealt with when evaluating this project?
Should this project be undertaken? If so, should the firm do the mitigation? Why or why not?
In: Finance
I need a response for the statement below. Anything to add to the statement, corrections or questions about the statement?
Eugenics, broken down, means good genes (Pence, 2017). There are positive and negative eugenics. Some contemporary developments in eugenics is “designer babies.” A designer baby is a baby whose genetic makeup has been designed prior to its birth to ensure desired characteristics or to prevent undesired ones (Pence, 2017). This reminds me of people wanting to have Olympic athletes as children, so they try to seek someone with the characteristics that they want their child to have, or go ‘shopping’ at a sperm bank to have the genes they are looking for. Genetics is simply heredity, or the genes passed on from parent to child. I do not necessarily believe in altering genes or genetics. I can understand the prevention of disease, but still believe that things should happen the way they’re supposed to happen. I can see the aspect of medicine to prevent disease, or the genetic testing and treatment options, but I do not believe it should be used to create a ‘super baby’ to where they are built to be superior and be the best athlete, or the best musician.
In: Nursing
Lance, Art, and Wayne have joined together to open a law
practice but are struggling to manage their cash flow. They haven’t
yet built up sufficient clientele and revenues to support their
legal practice’s ongoing costs. Initial costs, such as advertising,
renovations to their premises, and the like, all result in outgoing
cash flow at a time when little is coming in. Lance, Art, and Wayne
haven’t had time to establish a billing system since most of their
clients’ cases haven’t yet reached the courts, and the lawyers
didn’t think it would be right to bill them until “results were
achieved.”
Unfortunately, Lance, Art, and Wayne’s suppliers don’t feel the
same way. Their suppliers expect them to pay their accounts payable
within a few days of receiving their bills. So far, there hasn’t
even been enough money to pay the three lawyers, and they are not
sure how long they can keep practicing law without getting some
money into their pockets.
Can you provide any suggestions for Lance, Art, and Wayne to
improve their cash management practices?
Accounting Question
In: Accounting
Sally works as a manager in the gardening section of her local Bunnings Store. Recently, Sally was approached by a customer asking questions about the store’s range of built in kitchens. Although she knew nothing about the products, Sally recommended the deluxe kitchen package which came with free installation. After completing the sale, Sally handed the customer her Bunnings business card (which identified her as a manager), explained that the customer should get his new kitchen professionally installed and to forward her the 3rd party’s invoice – which Bunnings would pay. A few weeks later, the customer is shocked to learn that Bunnings is refusing to pay his carpenter’s $10,000 invoice and that Sally failed to mention that the offer was capped at $500.
Required:
(a) With reference to Pacific Carriers v Paribas, what is the test for deciding if an agent had apparent authority?
(b) Analyse whether Sally had apparent authority to bind Bunnings Pty Ltd to this $10,000 contract.
(c) How would your answer be different if the customer knew that Sally didn’t have permission to authorise this transaction
In: Accounting