Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

How would you solve in Python? Part III: Unfair Hiring System (20 points) Write a function unfair hiring system (0 that takes the following arguments,

How would you solve in Python?

image text in transcribed

Part III: Unfair Hiring System (20 points) Write a function unfair hiring system (0 that takes the following arguments, in this order. 11 applications: a list of strings containing some combination of 'strong'.'Fair ', 'Poor ' and "Disaster ' . If the current application is 'poor' and his current mood is less than 75% of his starting mood level then 2. mood: a positive integer that indicates the starting mood of the recruiter. A higher value increases his reject the application and subtracts from his current mood. chances of hiring weaker applicants, . If the current application is 'Disaster then reject the application and subtract 10 from his current A recruiter wants to hire people for his firm. He is given a list of applications to look at and needs to make mood. a list of applicants he wants to hire. The function will return a list of the indexes of people hired to be from the applications list. He starts off at a moodiness level of mood, but as time progresses, he starts to feel . Every application he checks decreases his mood by 1, regardless of how good the application is. exhausted, and judge applications more harshly. If his mood drops to 0 then he stops recruiting and starts rejecting Examples : all remaining applicants. Your function must mimic the scenario above. The recruiter analyzes each application in turm from the list as application1 = [' Strong ', 'Fair ', 'Disaster ' follows: application2 - application3 - 'Disaster', 'Poor ', 'Disaster ', 'Disaster ", 'Disaster , If the current application is strong then append the index of the application to the list you will return "Poor ', 'Disaster ", "Poor' and add 2 to his current mood. Function Call Return Value If the current application is 'Fair and his current mood is 50% or more of his starting mood level then unfair.hiring system (applications 1, 100 ) , 1) append the index of the application and add 1 to his current mood. unfair . hiring -system applications 2,50 ) ) If the current application is 'Fair" and his current mood is less than sort % of his starting mood level then unfair.hiring.system applications 3 , 200 ) (1,5] reject the application and subtract 2 from his current mood. If the current application is 'Poor and his current mood is 75% or more of his starting mood level then append the index of the application and subtract from his current mood. CSE 101 - Fall 2017 Lab M4 Page 3

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Ultimate Database For Cloud Analytics And Mobile

Authors: John Campbell, Chris Crone, Gareth Jones, Surekha Parekh, Jay Yothers

1st Edition

1583474013, 978-1583474013

More Books

Students also viewed these Databases questions