I need help writing a code to solve this problem.

The question asks "What position does each man fill? Submit a listing(code), and the output of your program"
Hello, the answer to the below question is as follows:
#Workers we have is : steve, john and luke
#S-steve; J-John; l-Luke
worker=['S','J','L']
#positions which are available for each man
#A-painter; B-Plumber; C-Carpenter
position=['A','B','C']
#since painter had a talk with carpenter regarding some work so
they heard of each other
#since carpenter was doing remodelling of plumber so they also
heard of each other
possible_heard=[('C','A'),('C','B'),('A','B')]
heard=[('C','A'),('C','B')]
not_heard=[]
for i in possible_heard:
if i not in heard:
not_heard.append(i)
#print(
#since john has never heard of luke
#not_heard must have their set
worker_never_heard=[('J','L')]
#d-dictionary having result sets
d={}
for i in worker:
if i in worker_never_heard[0]:
d[i]=list(not_heard[0])
else:
x=[]
for j in position:
if j not in not_heard[0]:
x.append(j)
d[i]=x
#since Its is give that plumber makes more money than painter
money_comp=[('B',1),('A',0)]
#Luke makes more money than John
max_index=0
for i in money_comp:
if i[1]>0:
max_index=money_comp.index(i)
else:
x=1
d['L']=list(money_comp[max_index][0])
d['J']=list(money_comp[x][0])
print(d)
print("Abbreviation---> S-steve; J-John; l-Luke")
for i,j in d.items():
if j[0]=='A':
print(i,":
Painter")
elif j[0]=='B':
print(i,":
Plumber")
elif j[0]=='C':
print(i,":
Carpenter")
and the output is:
$python main.py
{'S': ['C'], 'J': ['A'], 'L': ['B']}
Abbreviation---> S-steve; J-John; l-Luke
('S', ': Carpenter')
('J', ': Painter')
('L', ': Plumber')
comment for any query
thanks
I need help writing a code to solve this problem. The question asks "What position does...
I need help please. I can solve this problem
Question 50 6 pts Surgery Study: Part One: Advocates of minimally invasive surgery (MIS) claim that patients experience more pain with traditional surgery which makes larger incisions than they do with MIS. To investigate this claim, a researcher collected data on patients who underwent cardiovascular surgery, half with traditional surgery and half with MIS. The data consisted of the reported pain level of each patient recorded 24 hours after surgery. The...
I only need help with part B. I need help with the
sketch and all of B, not just the first part (like others have
answered previously.)
THIS IS THE PART I
REALLY NEED HELP WITH
1. [70 total points/ (the Exchange Paradox) You're playing the following game against an opponent, with a referee also taking part. The referee has two envelopes (numbered 1 and 2 for the sake of this problem, but when the game is played the envelopes...
Hello dear, Please i need help to solve this problem in Finance 1. Apply What You’ve Learned - Auto Purchase Scenario: You are in the market for a new car. You do not have a trade-in, but you have saved $2,500 toward a down payment. You currently earn $4,000.00 gross monthly income, of which 35% is withheld for various deductions. You have heard of the 20% rule of thumb, but want to limit your payments to no more than 15%...
Please solve the following question
below..................................
1. [10 total points/ (the Exchange Paradox) You're playing the following game against an opponent, with a referee also taking part. The referee has two envelopes (numbered 1 and 2 for the sake of this problem, but when the game is played the envelopes have no markings on them), and (without you or your opponent seeing what she does) she puts Sm in envelope 1 and $2m in envelope 2 for some m >...
I need help modifying this code please ASAP using C++
Here is what I missed on this code below
Here are the instructions
Here is the code
Produce correct70 pts O pts Full Marks No Marks results and statisfy requirements view longer Comments 1. Your display amount is not readable 2. I withdraw more than my balance, but I didn't see any error message description Documentations10 pts 0 pts Full Marks No Marks : comment i code and block comment...
Help Please on JAVA Project: Validating the input is where I need help. Thank you Requirements description: Assume you work part-time at a sandwich store. As the only employee who knows java programming, you help to write a sandwich ordering application for the store. The following is a brief requirement description with some sample output. 1. Selecting bread When the program starts, it first shows a list/menu of sandwich breads and their prices, then asks a user to select a...
i tried to solve this question but its too hard for me, can i
pls get some help?
Hi! i think this question is super hard and i cant understand it, it goes like this A goldsmith has a bracelet that weighs 20 grams. Of the weight of the bracelet 60% is gold and 40% silver. a) How many grams of silver does the bracelet contain? The goldsmith will now make a new bracelet with a halved portion of silver,...
Hey guys I need help with this assignment. However it contains 7
sub-problems to solve but I figured only 4 of them can be solved in
one post so I posted the other on another question so please check
them out as well :)
Here is the questions in this assignment:
Note: Two helper functions Some of the testing codes for the functions in this assignment makes use of the print_dict in_key_order (a dict) function which prints dictionary keyvalue pairs...
Please, I need help with program c++. This is a chutes and ladders program. The code must be a novel code to the specifications of the problem statement. Thank you very much. Assignment Overview This program will implement a variation of the game “chutes and ladders” or “snakes and ladders:” https://en.wikipedia.org/wiki/Snakes_and_Ladders#Gameplay. Just like in the original game, landing on certain squares will jump the player ahead or behind. In this case, you are trying to reach to bottom of the...
i really need help with the graphs
Driving Can Be Dangerous to Your Health: An Interrupted Case Study in Physiology Phil Stephens Department of Biology Villanova University Part 1-The Grandparents Arrive Dave pulled the cell phone out of his pocket, cursing himself for not putting it on vibrate. The children, Jason and Laura, were both asleep, and he knew that the rest of the day would not be fun if they were awakened from their naps. "Hi, Dave. We're just...