Question

In: Computer Science

A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...

A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000 per day for any day after 25th.
Category C 600 per day for 25 days , 400 per day for days before 25 days and 800 per day for days after 25th day

Question
1.write an algorithm
2. Translate to flowchart
3. Translate into actual program using language of your choice

Solutions

Expert Solution

If you have any doubts please comment below. As per the chegg honour code I did one of three.

Python Code :

# ask user for the category
type = input('Enter Category (A or B or C): ').upper()
# ask user for the number of days worked
days = int(input('Enter the number of days worked: '))
# create a variable to store the salary
salary =0
# check if the category is of type A
if type =='A':
if days<=25:salary = days*800
else: salary = 25*1000 + (days-25)*1200
# check if the category is of type B
elif type =='B':
if days<=25:salary = days*600
else: salary = 25*800 + (days-25)*1000
# check if the category is of type C
elif type=='C':
if days<=25:salary = days*400
else: salary = 25*600 + (days-25)*800

# print the salary at the end
print('Total Salary Earned:$',salary)


Related Solutions

A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories...
A construction company has 3 categories of casual workers. Category A,B and C. Workers in categories A are paid 1000 per day for first 25 days, you are paid 800 per day for less than 25 days, any extra day after 25th you are paid 1200 per day. In categorie B you are paid 800 per day if you work for 25 days otherwise you are paid 600 per day if you work for less than 25 days . 1000...
The largest category of healthcare workers is: A. Physicians B. Respiratory Therapists C. Physician Assistants D....
The largest category of healthcare workers is: A. Physicians B. Respiratory Therapists C. Physician Assistants D. Occupational Therapists E. Nurses
A. Give 3 categories of Long-term Investments (please mention examples for each category) B. What is...
A. Give 3 categories of Long-term Investments (please mention examples for each category) B. What is the difference between Tangible Assets and Intangible Assets? Give examples please.
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the...
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the past​ year, of the municipal bonds issued thoughout a​ country, 60% were rated​ A, 30% were rated​ B, and 10% were rated C. Of the municipal bonds rated​ A, 30% were issued by​ cities, 30% by​ suburbs, and 40% by rural areas. Of the municipal bonds rated​ B, 40% were issued by​ cities, 50% by​suburbs, and 10% by rural areas. Of the municipal bonds...
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the...
A municipal bond service has three rating categories​ (A, B, and​ C). Suppose that in the past​ year, of the municipal bonds issued thoughout a​ country, 60 % were rated​ A, 30 % were rated​ B, and 10 % were rated C. Of the municipal bonds rated​ A, 60 % were issued by​ cities, 10 % by​ suburbs, and 30 % by rural areas. Of the municipal bonds rated​ B, 40 % were issued by​ cities, 50 % by​ suburbs,...
Please explain the 3 categories of risk preference and which category applies to the average investor.
Please explain the 3 categories of risk preference and which category applies to the average investor.
In a trucking company, terminal docks include casual workers who are hired temporarily to account for...
In a trucking company, terminal docks include casual workers who are hired temporarily to account for peak loads. The minimum demand for causal workers during the 7 days of the week (starting on Monday) is 20,14,10,15,18,10 and 12 workers. Each worker is contracted to work 5 consecutive days. Develop the LP model that determines an optimal weekly hiring practice of causal workers for the company.     
A store has 4 categories A, B, C and D, create a program that asks you...
A store has 4 categories A, B, C and D, create a program that asks you 10 times the sale and the category so that at the end it shows you the total by category, and the sum of all. Code in C # and Python
A company has 3 machines: A, B, and C. The number of breakdowns per week is...
A company has 3 machines: A, B, and C. The number of breakdowns per week is distributed Poisson. On average, machine A breaks down .4 times per week, machine B breaks down .45 times per week and machine C breaks down .9 times per week. The probability that there are 2 breakdowns in one week is _____ (round to 4 decimal places).
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT