Questions
write an application that inputs a telephone number as a stringin the form (555) 555_5555....

write an application that inputs a telephone number as a string in the form (555) 555_5555. the application should use string method split to extract the area code as a token. the first three digits of the phone number as a token and the last four digits of the phone number as a token. the seven digits of the phone number should be concatenated into one string. Both the area code and the phone number should be printed. Remember that you'll have to change delimiter characters during the tokenization process.

In: Computer Science

Beth is a second-grader who sells lemonade on a street corner in your neighborhood. Each cup...

Beth is a second-grader who sells lemonade on a street corner in your neighborhood. Each cup of lemonade costs Beth $0.90 to produce; she has no fixed costs. The reservation prices for the 10 people who walk by Beth's lemonade stand each day are listed in the following table.

  Person 1 2 3 4 5 6 7 8 9 10

Reservation

price

$1.50 $1.40 $1.30 $1.20 $1.10 $1.00 $0.90 $0.80 $0.70 $0.60


Beth knows the distribution of reservation prices (that is, she knows that one person is willing to pay $1.50, another $1.40, and so on), but she does not know any specific individual’s reservation price.

a. Calculate the marginal revenue of selling an additional cup of lemonade. (Start by figuring out the price Beth would charge if she produced only one cup of lemonade, and calculate the total revenue; then find the price Beth would charge if she sold two cups of lemonade; and so on.)

Instructions: If you are entering any negative numbers be sure to include a negative sign (-) in front of those numbers. Enter your responses rounded to two decimal places.

Price Quantity

Total

revenue

($ per day)

Marginal

revenue

($ per cup)

1.50 1   
1.40 2
1.30 3
1.20 4
1.10 5
1.00 6
0.90 7
0.80 8
0.70 9
0.60 10


b. What is Beth’s profit-maximizing price?

Instructions: Enter your response rounded to two decimal places.

$ .

c. At that price, what are Beth’s economic profit and total consumer surplus?

Instructions: Enter your responses rounded to two decimal places.

Economic profit: $  per day.

Consumer surplus: $  per day.

d. What price should Beth charge if she wants to maximize total economic surplus?

Instructions: Enter your response rounded to two decimal places.

Price to maximize total economic surplus: $

In: Economics

Connie Jefferson is the primary flower dealer in her hometown of San Flores. Connie has watched...

Connie Jefferson is the primary flower dealer in her hometown of San Flores. Connie has watched the sales volume of her favorite flower, the yellow rose, change over the past 10 weeks. The changes are due to an experiment that Connie is conducting. She has been told that she could sell more roses by reducing the price, and Connie tends to agree. In her experiment, Connie has set out to determine the relationship between the price charged for yellow roses and the quantity demanded. Over the past 10 weeks, Connie has carefully tracked the selling price of her roses and the quantity sold. Her data are as follows:

Week

Price

Quantity

Sold

1

$30

50

2

8

270

3

10

240

4

27

90

5

25

110

6

21

130

7

12

200

8

15

190

9

19

160

10

20

150

            a.         Develop a least squares regression equation that shows the relationship between the   

quantity of roses sold and the price charged.

            b.         If Connie sets the price at $17, what should be the demand for her roses?

            c.          Discuss the use of this modeling process in a different business setting.

In: Operations Management

To include variables in the input prompt, you must use concatenation character (+). For example: assume...

To include variables in the input prompt, you must use concatenation character (+). For example: assume you already asked for input of employee's first name and last name (they are stored into variables FirstName and LastName, then use this prompt to ask for employee's weekly hours which includes the employee's full name in the input statement.

Hours = float(input("Enter " + FirstName + ' ' + LastName + '\'s Weekly Hours: '))

The company which uses this program has TWO employees.

Write a Python application that will allow the user (payroll clerk) to enter payroll data for two hourly employees. Input Data includes:

  • Employee ID (string text such as AF101)
  • Employee Last Name (string text)
  • Employee First Name (string text)
  • Weekly Hours
  • Hourly pay rate per hour
  • Income tax rate

Repeat the above prompt for two employees

Must use if statements to check if the employee requires an overtime pay.

Up to 40 hours on employee’s hourly rate; any hours over 40 must be pay at a time and a half (1.5 of rate). Using , and 2 decimal places for all currency in the output

Display the followings for each employee:

  • Display Employee Data (ID, First and Last Name)
  • Display Weekly Hours and Hourly pay rate
  • Display the Gross Pay (includes overtime if any)
  • Taxes Withheld (Gross Pay x Tax Rate)
  • Net Pay (Gross Pay – Taxes Withheld)

Then finally output payroll info for the entire company (total amount for both employees)

  • Display Company payroll expense (sum of both employees’ Gross Pay)
  • Display Total Cash amount to Employees (sum of both employees’ Net Pay)

Sample input/output (user input is in bold italic)

Enter Employee’s ID (i.e. AF101): AS111

Enter Employee’s Last Name: Wong

Enter Employee’s First Name: Wanda

Enter Wanda Wong’s Weekly Hours: 36.5

Enter Wanda Wong’s Hourly pay rate per hour:  50

Enter Wanda Wong’s Income tax rate: 0.25

Enter Employee’s ID (i.e. AF101): AS256

Enter Employee’s Last Name: Johnson

Enter Employee’s First Name: Betty

Enter Betty Johnson’s Weekly Hours: 52

Enter Betty Johnson’s Hourly pay rate per hour:  30

Enter Betty Johnson’s Income tax rate: 0.20

Weekly Pay stub for AS111                       Wanda Wong

36.5 Hours Worked @ $50.00

Gross pay of                                                      $1,825.00

Less Taxes Withheld @ 25.0%                     $456.25

Net Pay                                                                  $1,368.75

Weekly Pay stub for AS256                       Betty Johnson

52 Hours Worked @ $30.00

Gross pay of                                                       $1,740.00

Less Taxes Withheld @ 20.0%                      $348.00

Net Pay                                                                   $1,392.00

Total Company payroll expense for the week: $3,565.00

Total Cash payments to Employees: $2,760.75

In: Computer Science

1COMP1410 - Lab Exercises #3 (Due at the end of the lab period or beginning of...

1COMP1410 - Lab Exercises #3 (Due at the end of the lab period or beginning of the next) Start Date: Oct. 1st, 2019

Objectives: Practice dealing with 2D arrays.

Create a two dimensional array (e.g. int A2D[M][N];) of size MxNto store integer values. Use #define M 4and N 3to start. (Using symbolic constants instead of hard coding the array sizes improves scalability). Create an interactive menu within main() for this program (call it Lab3.c) with choices to fill the array with random numbers, search the array, right shift the array, print the array and quit.

Your program must code and document the following functions:

printArray2D()to print the array in a table format (use formatting codes to achieve this).

populateRandom2D()to populate the array with pseudo-random numbers between minand max numbers entered by the user.

linearSearch2D()to search the array for a value.

rightShift2D()to right shift the array. RIGHT shift means move every element one position to the RIGHT; the last element becomes the first one, and the last element in each row moves down to become the first element in the next row.

Each one of the functions above accepts a 2D array as a parameter, along with any additional parameters that you may find necessary. The return types of the functions are also your choice. Do NOT use global (i.e. file scope) variables in this program.

Sample Interaction

Lab3 ------

1 - Fill the array

2 - Search the array

3 - Right shift the array

0 - QUIT

Please enter a selection: 1

Enter min number in the array: 2

Enter max number in the array: 20

4 17 10

9 8 19

11 18 8

5 19 7

Lab3 ------

1 - Fill the array

2 - Search the array

3 - Right shift the array

0 - QUIT

Please enter a selection: 2

Please enter a value to search for: 19

Value 19 was found at (2,3).

Value 19 was found at (4,2).

Lab3 ------

1 - Fill the array

2 - Search the array

3 - Right shift the array

0 - QUIT

Please enter a selection: 2

Please enter a value to search for: 21

Value 21 was not found.

Lab3 ------

1 - Fill the array

2 - Search the array

3 - Right shift the array

0 - QUIT

Please enter a selection: 3

7 4 17

10 9 8

19 11 18

8 5 19

Lab3 ------

1 - Fill the array

2 - Search the array

3 - Right shift the array

0 - QUIT

Please enter a selection: 0

Goodbye!

In: Computer Science

Assume the following people are interviewed by a representative of the Bureau of Labor Statistics. Classify...

Assume the following people are interviewed by a representative of the Bureau of Labor Statistics. Classify each as either employed, unemployed, or not in the labor force. For each scenario, explain why you classified the person the way you did.

  1. Nancy Lopez reported to the interviewer that last week she worked 30 hours as a sales manager for the Coca-Cola Bottling company.
  2. Bill Stevens lost his job when the local plant of Arco Steel Company was closed down. Since then, he has been visiting the personnel offices of the other factories in the town trying to find a job.
  3. Patricia Hunter is a homemaker. Last week, she was occupied with her normal household chores. She neither held a job nor looked for a job. Her 75-year old father, Jake Jackson, lives with her and has not worked nor looked for work because of a disability.
  4. Julie Simon is an autoworker. Last week she was not working because her union is on strike against the local automaker.
  5. Tom Nguyen is a personnel director. Last week he was not working because he had problems finding child care for his two small children.
  6. Explain how the natural rate of unemployment is determined.
  7. Should the main macroeconomic aim of the government be full employment? Please explain your response.

In: Economics

A student at a university has been doing a project to investigate entertainment habits of students....

A student at a university has been doing a project to investigate entertainment habits of students. They have surveyed 100 random students who were each asked three questions:

  1. Have you watched a movie in the last week?
  2. Have you listened to music in the last week?
  3. Have you read a book in the last week?

However, the student keeps a very messy room and has lost some of the results. They have been able to find the following results:

Of all the students surveyed, 46 had watched a movie, 36 had listened to music and 41 had read a book in the last week. Also:

  • 4 students answered yes to all three questions
  • 10 students answered yes to questions 1 and 2 only
  • 12 students answered yes to questions 1 and 3 only
  • 20 students answered yes only to question 1
  • 18 students answered no to all three questions

Find the missing information and answer the following questions regarding the group surveyed. Give your answers as whole numbers.

Calculate the number of students that:

a)answered yes to question 3 only =

b)answered yes to exactly two questions =

c)had watched a movie or listened to music but had not read a book =

In: Math

Todd's Direct, a major TV sales chain headquartered in New​ Orleans, is about to open its...

Todd's Direct, a major TV sales chain headquartered in New​ Orleans, is about to open its first outlet in​ Mobile, Alabama, and wants to select a site that will place the new outlet in the center of​ Mobile's population base. Todd examines the seven census tracts in​ Mobile, plots the coordinates of the center of each from a​ map, and looks up the population base in each to use as a weighting. The information gathered appears in the following table.

Census Tract

Population in Census Tract

​X, Y Map Coordinates

101

1,800

​(26​,46​)

102

4,800

​(25​,25​)

103

9,500

​(52​,48​)

104

6,800

​(50​,18​)

105

10,400

​(84​,48​)

106

18,000

​(70​,22​)

107

14,000

​(96​,22​)

​a) The​ center-of-gravity coordinates for the location of the proposed outlet in​ Mobile, Alabama should​ be:

x​ = ___ ​(round your response to two decimal​ places).

y​ = ___ ​(round your response to two decimal​ places

​b) Census tracts 103 and 105 are each projected to grow by 30​% in the next year. The new​ center-of-gravity coordinates for the location of the proposed outlet in​ Mobile, Alabama should​ be:

x​ = ____ ​(round your response to two decimal​ places).

y​ = ____ ​(round your response to two decimal​ places).

In: Operations Management

For the following four questions, a group of residents were asked about their support for a...

For the following four questions, a group of residents were asked about their support for a homeless shelter being opened in their neighborhood. They were also asked about how long they had lived in the neighborhood, with short term residency defined as less than three years and long-term as three years or more. Resident Neighborhood Tenure Supports Shelter 1 Short term Yes 2 Short term No 3 Long term Yes 4 Long term No 5 Short term Yes 6 Short term Yes 7 Long term No 8 Short term Yes 9 Short term Yes 10 Short term No Flag this Question Question 1 4 pts What is the probability of selecting a short term resident at random from this group? Flag this Question Question 2 4 pts What is the probability of selecting a resident who does not support the homeless shelter at random from this group? Flag this Question Question 3 4 pts What is the probability of selecting a long term resident who supports the homeless shelter at random from this group? Flag this Question Question 4 4 pts What is the probability of selecting a short term resident who does not support the homeless shelter at random from this group? Flag this Question For the following two questions, research has shown that nearly 25% of homeless adults are veterans. Flag this Question Question 5 4 pts What is the probability of selecting a particular homeless person who is not a veteran? Flag this Question Question 6 4 pts What is the probability of selecting two random homeless people who are both veterans? Flag this Question For the following seven questions, you are drawing one card at random from a standard deck of 52 cards. Flag this Question Question 7 4 pts What is the probability of drawing the eight of diamonds? Flag this Question Question 8 4 pts What is the probability of drawing a diamond card? Flag this Question Question 9 4 pts What is the probability of drawing an eight? Flag this Question Question 10 4 pts What is the probability of drawing a red car

In: Statistics and Probability

A drug company is advertising that its snore-curing product has a success rate of at least...

A drug company is advertising that its snore-curing product has a success rate of at least 90%. A doctor has been prescribing the product to his customers, however she’s disap- pointed with the results. She decides to do an experiment on a random sample of 50 snorers. She puts them on a course to use the product in 2 weeks. After that, she calls them back to see whether the snoring has stopped. The results were: 42 stopped snoring and the rest still had it. Does the doctor has sufficient evidence to claim that the drug company’s advertisement was misleading at 5% significance level?

1. Ho: p (= ; <= ; >=)   0.9

Ha: p (< > ; > ; <)   0.9

2. Statistical test: (z / t)   test

3. Level of significance (be careful as to one-tailed or two-tailed)

4. Set up critical values (Write the value in the box, include "-" sign if negative, if two values, just write the positive one)

5. Gather sample data: p_hat =  ; n = 50

6. Calculate test statistic (write your answer correct to 2 decimal places)  

6*. The p-value of the test is

7. Make statistical conclusion: (Reject / Do not reject)   the null hypothesis. There is (sufficient/insufficient)   evidence that the the drug company's advertising was misleading at 5% level of significance.

In: Statistics and Probability