Python Programming
1. Write a function name split_name which takes one parameter called name. If the name parameter value is a name in the form LastName, FirstName(e.g., ”Grounds, Nic”) then the function should return a list of two elements where FirstName is the first element and LastName is the second element. If the name parameter value is a name in the form FirstName LastName(e.g., ”Nic Grounds”) then the function should return a list of two elements where FirstName is the first element and LastName is the second element.
2. Repeatedly prompt the user for a name (which the user may give in Last-name, FirstName form or FirstName LastName form). If the user’s response is an empty string (i.e., they simply press Return) cease looping. If the user’s response is not the empty string, call the split_name function you wrote and append the returned value to a list (initially empty).
3. Using the sorted function (which can take a single parameter, a list) and returns a copy of the list in sorted order) sort the list of names once the loop has finished. Print the sorted list of names, one name per line in LastName, FirstName form.
4. Observe the sorted list of names, are they sorted alphabetically by first name or last name? Leave your answer in a comment within the Python file you submit. Also, how do you think we could potentially modify the program to sort by last name instead of first (or first name instead of last, whichever is opposite of what you observed)? Leave your answer in a comment within the Python file you submit.
5. At the top of your file must be a comment that contains a brief explanation of how you determined which portion of each name was the first name vs. the last name.
In: Computer Science
Buchholz Corporation follows a moderate current asset investment policy, but is now considering a change, perhaps to a restricted or maybe to a relaxed policy. The firm's annual sales are $400,000; its fixed assets are $100,000; its target capital structure calls for 50% debt and 50% equity; its EBIT is $50,000; the interest rate on debt is 8%; and its tax rate is 25%. With a restricted policy, current assets will be 15% of sales, while under a relaxed policy, current assets will be 25% of sales. What is the difference in the projected ROEs between the restricted and relaxed policies? Enter your answer rounded to two decimal places. Do not enter % in the answer box. For example, if your answer is 0.12345 or 12.345% then enter as 12.35 in the answer box.
In: Finance
Buchholz Corporation follows a moderate current asset investment policy, but is now considering a change, perhaps to a restricted or maybe to a relaxed policy. The firm's annual sales are $400,000; its fixed assets are $100,000; its target capital structure calls for 50% debt and 50% equity; its EBIT is $40,000; the interest rate on debt is 8%; and its tax rate is 25%. With a restricted policy, current assets will be 15% of sales, while under a relaxed policy, current assets will be 25% of sales. What is the difference in the projected ROEs between the restricted and relaxed policies? Enter your answer rounded to two decimal places. Do not enter % in the answer box. For example, if your answer is 0.12345 or 12.345% then enter as 12.35 in the answer box.
In: Finance
We have a bag filled with 201 marbles, of which 100 of them are blue and 101 of them are red. Every turn, we remove 2 marbles from the bag. If the two marbles are of the same color, we remove the two marbles but add a blue marble into the bag. If the two marbles are of different colors, we remove the two marbles and add a red marble into the bag. What is the color of the last marble in the bag?
In: Statistics and Probability
You are given the following information:
The current price of copper is $83 per 100 lbs. The term structure of interest rates is flat at 5% per year continuously compounded. Assume there are no costs associated with storing copper and that the trader can borrow and lend at the riskless rate. The convenience yield for all maturities is 7% per year continuously compounded. Consider a forward contract in which the short position has to make two deliveries: 10,000 lbs of copper in one month and 10,000 lbs of copper in two months. The common delivery price is P. That is the short receives P dollars for delivery after one month and another P dollars for delivery after two months. Establish the fair value of this unusual forward contract. That is find the value for P. make sure to define all terms and to carefully explain how you arrived at your answer.
In: Finance
An unprepared student must take a 7-question, multiple-choice test that has 5 possible answers per question. If the student can eliminate two of the possible answers on the first three questions, and if she guesses on every question, what is the probability that she will answer at least one question correctly?
In: Accounting
Calculate the pressure losses across the different sections of drill pipe and annulus by using the Bingham plastic fluid model (You must draw the wellbore structure chart: without the chart, 50% points will be deducted) PROBLEM: MD/TVD: 12,031 ft Surface casing: 2,135 ft of 133⁄8-in. 61 lb/ft Intermediate casing: 10,786 ft of 95⁄8-in. 40 lb/ft Bit: 85⁄8 in. Nozzles (32nds in.): 11, 11, 11 Surface connections: Case 3 Drill pipe: 41⁄2 in., 16.6 lb/ft Drill collars: 390 ft of 7 in. x 21⁄4 in. Surface pressure: 3,000 psi Mud weight: 12.8 lb/gal Funnel viscosity: 42 sec/qt Plastic viscosity: 19 cP Yield point: 15 lb/100 ft2 Initial gel: 8 lb/100 ft2 Flow rate: 335 gpm
In: Mechanical Engineering
Psychopaths tend to be cold and calculated, often not worrying about others or consequences so they are typically not anxious. You are curious whether anxiety scores for people are associated with psychopathy scores. To test this you survey 12 undergraduate students on their anxiety level (0 to 100, higher mean more anxious) and their score on a standard psychopathy measure (0 to 40, higher score indicated a higher level of psychopathy). The data is as follows:
|
person |
Anxiety |
Psychopathy |
|
1 |
75 |
5 |
|
2 |
50 |
15 |
|
3 |
27 |
20 |
|
4 |
60 |
10 |
|
5 |
5 |
19 |
|
6 |
5 |
21 |
|
7 |
6 |
15 |
|
8 |
71 |
3 |
|
9 |
2 |
30 |
|
10 |
9 |
17 |
|
11 |
3 |
12 |
|
12 |
10 |
18 |
3) Explain this relationship in every day terms (what would you say to a person who does not know anything about correlations).
In: Statistics and Probability
En-range Networks is a startup internet service provider in Japan that is aiming to provide faster internet access to Japanese citizens. The company has recently finished installing its main access node just south of Tokyo and has hired you to conduct speed tests and analyze the results.
To get some intial data, you decide to conduct latency tests from the newly completed node to random servers around the world. Your tests yield the following data:
|
|
To analyze this data, you decide to conduct a t-test to see if the mean of this data is above 35 ms, assuming that ?=.05.
What is the p-value of your t-test?
Can you say that the mean of the data is greater than 35?
In: Statistics and Probability
Rent'R Cars is a multisite car rental company in the city. It is trying out a new "return the car to the location most convenient for you" policy to improve customer service. But this means that the company has to constantly move cars around the city to maintain required levels of vehicle availability. The supply and demand for economy cars, and the total cost of moving these vehicles between sites, are shown below.
| From\To | D | E | F | G | Supply | ||||||
| A |
$15 |
$16 |
$14 |
$6 |
70 | ||||||
| B |
8 |
7 |
13 |
6 |
35 | ||||||
| C |
14 |
9 |
15 |
12 |
100 | ||||||
| Demand | 55 | 60 | 50 | 40 | 205\205 | ||||||
a. Find the solution that minimizes moving costs
using Microsoft Excel. (Leave no cells blank - be certain
to enter "0" wherever required.)
|
In: Statistics and Probability