Day of week
Write a program that asks the user for a date (year, then month, then day, each entered as a number on a separate line), then calculates the day of the week that date falls on (according to the Gregorian calendar) and displays the day name.
You may not use any date functions built into Python or its standard library, or any other functions that do this work for you.
Hint: Reverend Zeller may be useful, but his years start in a weird spot.
Give credit to your sources by including an exact, working URL in a comment at the top of your program.
LAB
In: Computer Science
Create a Java method findLongestPalindrome that takes a Scanner scn as its parameter and returns a String. It returns the longest token from scn that is a palindrome (if one exists) or the empty string (otherwise). (Implementation note: Use the built in isPalindrome method. This method calls for an optimization loop.)
Where the isPalindrome Method takes a String s as a parameter and returns a boolean. It returns true if s reads the same forwards and backwards, i.e., is a Palindrome, and returns false otherwise.
I only need help creating the findLongestPalindrome method, I already have the isPalindrome method.
In: Computer Science
Run the following R commends.
set.seed(2019) x = rnorm(100,mean=0, sd=2) y = rnorm(100,mean=0,
sd=20)
[NOTE: Do NOT use built-in functions which can directly solve the
problems.]
(1) Compute the means of values in the vectors x and y,
respectively. Which one is more close to zero? Explain the
reason.
(2) Compute the sample standard deviations of values in the vector
x and y, respectively.
(3) Find the index positions in x and y of the values between -5
and 5, respectively
In: Computer Science
|
Millions of t tons |
Probability |
|
10 |
10 |
|
12 |
25 |
|
14 |
30 |
|
16 |
20 |
|
18 |
15 |
In: Operations Management
Tombro Industries is in the process of automating one of its plants and developing a flexible manufacturing system. The company is finding it necessary to make many changes in operating procedures. Progress has been slow, particularly in trying to develop new performance measures for the factory.
In an effort to evaluate performance and determine where improvements can be made, management has gathered the following data relating to activities over the last four months:
| Month | ||||||||
| 1 | 2 | 3 | 4 | |||||
| Quality control measures: | ||||||||
| Number of defects | 193 | 171 | 132 | 93 | ||||
| Number of warranty claims | 54 | 47 | 38 | 35 | ||||
| Number of customer complaints | 110 | 104 | 87 | 66 | ||||
| Material control measures: | ||||||||
| Purchase order lead time | 10 days | 9 days | 7 days | 5 days | ||||
| Scrap as a percent of total cost | 1 | % | 1 | % | 2 | % | 3 | % |
| Machine performance measures: | ||||||||
| Machine downtime as a percentage of availability | 4 | % | 5 | % | 5 | % | 8 | % |
| Use as a percentage of availability | 95 | % | 92 | % | 89 | % | 85 | % |
| Setup time (hours) | 10 | 12 | 13 | 14 | ||||
| Delivery performance measures: | ||||||||
| Throughput time | ? | ? | ? | ? | ||||
| Manufacturing cycle efficiency (MCE) | ? | ? | ? | ? | ||||
| Delivery cycle time | ? | ? | ? | ? | ||||
| Percentage of on-time deliveries | 96 | % | 95 | % | 92 | % | 89 | % |
The president has read in industry journals that throughput time, MCE, and delivery cycle time are important measures of performance, but no one is sure how they are computed. You have been asked to assist the company, and you have gathered the following data relating to these measures:
| Average per Month (in days) |
||||
| 1 | 2 | 3 | 4 | |
| Wait time per order before start of production |
8.0 | 10.7 | 11.0 | 13.0 |
| Inspection time per unit | 0.7 | 0.6 | 0.6 | 0.6 |
| Process time per unit | 2.8 | 2.6 | 2.4 | 1.1 |
| Queue time per unit | 4.1 | 4.4 | 6.3 | 8.4 |
| Move time per unit | 0.4 | 0.7 | 0.7 | 0.9 |
Required:
1-a. Compute the throughput time for each month.
1-b. Compute the manufacturing cycle efficiency (MCE) for each month.
1-c. Compute the delivery cycle time for each month.
3-a. Refer to the inspection time, process time, and so forth, given for month 4. Assume that in month 5 the inspection time, process time, and so forth, are the same as for month 4, except that the company is able to completely eliminate the queue time during production using Lean Production. Compute the new throughput time and MCE.
3-b. Refer to the inspection time, process time, and so forth, given for month 4. Assume that in month 6 the inspection time, process time, and so forth, are the same as in month 4, except that the company is able to eliminate both the queue time during production and the inspection time using Lean Production. Compute the new throughput time and MCE.
In: Accounting
Tombro Industries is in the process of automating one of its plants and developing a flexible manufacturing system. The company is finding it necessary to make many changes in operating procedures. Progress has been slow, particularly in trying to develop new performance measures for the factory.
In an effort to evaluate performance and determine where improvements can be made, management has gathered the following data relating to activities over the last four months:
| Month | ||||||||
| 1 | 2 | 3 | 4 | |||||
| Quality control measures: | ||||||||
| Number of defects | 193 | 171 | 132 | 93 | ||||
| Number of warranty claims | 54 | 47 | 38 | 35 | ||||
| Number of customer complaints | 110 | 104 | 87 | 66 | ||||
| Material control measures: | ||||||||
| Purchase order lead time | 10 days | 9 days | 7 days | 5 days | ||||
| Scrap as a percent of total cost | 1 | % | 1 | % | 2 | % | 3 | % |
| Machine performance measures: | ||||||||
| Machine downtime as a percentage of availability | 4 | % | 5 | % | 5 | % | 8 | % |
| Use as a percentage of availability | 95 | % | 92 | % | 89 | % | 85 | % |
| Setup time (hours) | 10 | 12 | 13 | 14 | ||||
| Delivery performance measures: | ||||||||
| Throughput time | ? | ? | ? | ? | ||||
| Manufacturing cycle efficiency (MCE) | ? | ? | ? | ? | ||||
| Delivery cycle time | ? | ? | ? | ? | ||||
| Percentage of on-time deliveries | 96 | % | 95 | % | 92 | % | 89 | % |
The president has read in industry journals that throughput time, MCE, and delivery cycle time are important measures of performance, but no one is sure how they are computed. You have been asked to assist the company, and you have gathered the following data relating to these measures:
|
Average per Month (in days) |
||||
| 1 | 2 | 3 | 4 | |
| Wait
time per order before start of production |
8.0 | 10.7 | 11.0 | 13.0 |
| Inspection time per unit | 0.7 | 0.6 | 0.6 | 0.6 |
| Process time per unit | 2.8 | 2.6 | 2.4 | 1.1 |
| Queue time per unit | 4.1 | 4.4 | 6.3 | 8.4 |
| Move time per unit | 0.4 | 0.7 | 0.7 | 0.9 |
Required:
1-a. Compute the throughput time for each month.
1-b. Compute the manufacturing cycle efficiency (MCE) for each month.
1-c. Compute the delivery cycle time for each month.
3-a. Refer to the inspection time, process time, and so forth, given for month 4. Assume that in month 5 the inspection time, process time, and so forth, are the same as for month 4, except that the company is able to completely eliminate the queue time during production using Lean Production. Compute the new throughput time and MCE.
3-b. Refer to the inspection time, process time, and so forth, given for month 4. Assume that in month 6 the inspection time, process time, and so forth, are the same as in month 4, except that the company is able to eliminate both the queue time during production and the inspection time using Lean Production. Compute the new throughput time and MCE.
In: Accounting
Case study: Deciding what is effective from different perspectives
The aim of this case study is to illustrate the sometimes competing demands of effectiveness, efficiency and equity. In particular, it should help you to:
Explain what is meant by key terms such as ‘LYG’, ‘QALY’ and ‘ICER’
Use these terms and the information they represent in a decision-making scenario ? Compare and contrast the demands of effectiveness from different perspectives
Scenario
You are a member of an area prescribing committee (APC) which is reviewing the treatment options for a cancer which is universally rapidly fatal (usually within months) if not treated. For the purposes of this cases study, please assume the following:
There is good evidence supporting the effectiveness of three medicines (A, B and C) in improving health outcomes.
The treatments are mutually exclusive: there is no evidence that patients are better off switching from one to another.
Effectiveness does not depend on patient or disease characteristics.
All costs fall within the first year of treatment.
Costs vary only according to the drug selected, since staff time, etc. are fixed and are the same requirements for each treatment.
The annual budget available for commissioning treatment is US$500,000. ? The incidence of this cancer in the area covered by your APC is 1,000 new cases each year.
The health economic data are summarized below:
|
Treatment |
Life-Year Gained |
Health Utility Index (in each year) |
Cost (per patient) |
|
A (current practice) |
0.3 |
0.8 |
$500 |
|
B |
0.6 |
0.6 |
$1,000 |
|
C |
0.5 |
0.5 |
$800 |
Question 1: Given the available budget of $500,000 per year, how many people could be treated with each option? Please show your calculation and explain briefly about why the current practice is Treatment A. (20%)
Question 2: Measuring the cost-effectiveness by the incremental cost-effectiveness ratio (ICER), compared with the current practice, which treatment (B or C) is more cost-effective for a hospital use? Please show your calculation and explain briefly. (20%)
Question 3: From a patient perspective, which treatment is the most effective by considering the quality of life? Please show your calculation and explain briefly. (20%)
Question 4: From a society perspective, which treatment generates the greatest health gains given the funds available? Please show your calculation and explain briefly. (20%)
Question 5: Which treatment would you recommend to the area prescribing committee (APC): A, B or C? Please discuss your choice from perspectives of equity, efficiency and effectiveness. (20%)
In: Economics
The aim of this case study is to illustrate the sometimes competing demands of effectiveness, efficiency and equity. In particular, it should help you to:
Explain what is meant by key terms such as ‘LYG’, ‘QALY’ and ‘ICER’
Use these terms and the information they represent in a decision-making scenario
Compare and contrast the demands of effectiveness from different perspectives
Scenario You are a member of an area prescribing committee (APC) which is reviewing the treatment options for a cancer which is universally rapidly fatal (usually within months) if not treated. For the purposes of this cases study, please assume the following:
There is good evidence supporting the effectiveness of three medicines (A, B and C) in improving health outcomes.
The treatments are mutually exclusive: there is no evidence that patients are better off switching from one to another.
Effectiveness does not depend on patient or disease characteristics.
All costs fall within the first year of treatment.
Costs vary only according to the drug selected, since staff time, etc. are fixed and are the same requirements for each treatment.
The annual budget available for commissioning treatment is US$500,000.
The incidence of this cancer in the area covered by your APC is 1,000 new cases each year.
The health economic data are summarized below:
Treatment
A
B
C
Life-Year Gained
A. 0.3
B. 0.6
C. 0.5
Health Utility Index (in each year)
A. 0.8
B. 0.6
C. 0.5
Cost (per patient) A (current practice)
A. $500
B. $1000
C. $800
Question 1: Given the available budget of $500,000 per year, how many people could be treated with each option? Please show your calculation and explain briefly about why the current practice is Treatment A. (20%)
Question 2: Measuring the cost-effectiveness by the incremental cost-effectiveness ratio (ICER), compared with the current practice, which treatment (B or C) is more cost-effective for a hospital use? Please show your calculation and explain briefly. (20%)
Question 3: From a patient perspective, which treatment is the most effective by considering the quality of life? Please show your calculation and explain briefly. (20%)
Question 4: From a society perspective, which treatment generates the greatest health gains given the funds available? Please show your calculation and explain briefly. (20%)
Question 5: Which treatment would you recommend to the area prescribing committee (APC): A, B or C? Please discuss your choice from perspectives of equity, efficiency and effectiveness. (20%)
In: Economics
Answer the following questions:
1. Guests at a busy eight-story four-star hotel are consistently
complaining about having
to wait too long for the elevator. At 8:00am, some of the elevators
are in use by the
housekeeping department whose associates are going up to begin work
on the guest
rooms. At the same time, room service has an elevator blocked off
to serve in-room
breakfasts because the kitchen and the banqueting departments are
using the service
elevators. Then, at about 10:30 am, the housekeepers use the
elevators to go down for
their morning break. Guests have come to you as a front office
supervisor to report the
issue.
Question:
The general manager recognises your potential and asks you to come
up with
suggestions to take care of the problem/challenge. 20 marks
2. As a front office supervisor, you have realised that a client
disagrees with your front
office clerk on a request being made. The client is not happy about
the outcome and is
seriously angry. Does that mean that the message has not been
properly understood by
the client? Or could it mean something else? Explain 20 marks
In: Operations Management
ABC Hotel Limited (“ABCHL”) operates a small store selling spa oil. ABCHL sells each unit for $80. Variable costs per unit equal $40. Total fixed costs equal $460,000. ABCHL is currently selling 12,000 units per period. The management would like to earn net income of $80,000.
ABCHL considers whether a promotion campaign to be carried out in next year. The cost of the promotion campaign is $100,000. The expected increase in unit of sales is 20% and 30% if the selling price is $80 and $72 respectively.
(a) Compute:
(i) Contribution margin per unit in dollars.
(ii) Contribution margin percentage.
(iii) Break-even point in dollars.
(iv) Break-even in units.
(v) Sales units necessary to attain desired income of $80,000. (vi)
Margin of safety ratio for current operations.
(b) Should ABCHL carry out the promotion campaign in next year. Justify your answer by showing all relevant calculations.
In: Accounting