Answered step by step
Verified Expert Solution
Question
1 Approved Answer
pyhton program Question 4 The nation of Funland has several medical schools which are managed by a central board. Each medical student graduate applies for
pyhton program
Question 4 The nation of Funland has several medical schools which are managed by a central board. Each medical student graduate applies for a residency program to the central board and is interviewed by each of the eight interviewers. Each interviewer awards points from 1 to 10. Based on the average of the scores from the eight interviewers, the applicant either (A) gets accepted in the residency program of the applicant's choice, (B) is matched with spots available in other residency programs, or (C) is rejected based on the following rules: Average Placement Equal or more than 7 Matched to the applicant's choice residency program Between 5 and 7 (including 5, excluding 2) Matched with available residency spots Less than 5 Not accepted Given the ID and the choice of residency program of each applicant, determine and display the applicant's placement message. In addition, display the total number of applicants accepted to the residency program. Note: Rather than inputting the scores of the eight interviewers for each applicant (which would take a lot of time in testing), use the random module and the randint function to randomly generate values between 1 and 10 (inclusive) for each interviewer per applicant. See textbook page 165 for an example of random number generation Sample input and output from the program is as follows: Enter the id of the applicant: 111 Enter the desired residency program: Family Interviewer's scores: 6 5 4 3.7216 Average: 4.25 Applicant 111 is not accepted into the residency program at this time. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 234 Enter the desired residency program: Pediatrics Interviewer's scores: 4 8 10 10 4 9 10 8 Average: 7.875 Applicant 234 is accepted in the Pediatrics residency program. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 432 Enter the desired residency program: Radiology Interviewer's scores: 8 3 8 7 5 5 5 1 Average: 5.25 Applicant 432 will be matched with an available residency spot. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 231 Enter the desired residency program: Family Interviewer's scores: 2816869 10 Average: 6.25 Applicant 231 will be matched with an available residency spot. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 324 Enter the desired residency program: Radiology Interviewer's scores: 3 10 8 2 10 4 21 Average: 5.0 Applicant 324 will be matched with an available residency spot. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 543 Enter the desired residency program: Surgery Interviewer's scores: 1 57 6.8 8.92 Average: 5.75 Applicant 543 will be matched with an available residency spot. Do you want to process another applicant? (yes or no) yes Enter the id of the applicant: 555 Enter the desired residency program: Surgery Interviewer's scores: 6 1 5 8 7 2 3 5 Average: 4.625 Annlicant 555 is not accented into the resident Donram at this timeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started