Fork and clone this repository in your python
directory.
In this task you'll be creating a recruitment system. You'll ask the user a few questions and depending on their answers you will either accept or reject the applicant.
Example:
Welcome to the special recruitment program, please answer the following questions:
What's your name? Kale Salad
How old are you? 30
How many years of experience do you have? 6
Skills:
1. Python
2. C++
3. Javascript
4. Juggling
5. Running
6. Eating
Choose a skill from above by entering its number: 1
Choose another skill from above by entering its number: 6
You have been accepted, Kale Salad.
In this example, the user entered their name, age, years of experience, and chose the 1st and 6th skills from the list.
- In the
get_skills
function, add at least 3 random skills to the list - In the
show_skills
function, print all the skills to the user, so that we can call this function before prompting the user to select from them.- The printed skills should be listed in a shape of an ordered list from 1 ...
n
, where n is the length of the list (look intoenumerate
).
- The printed skills should be listed in a shape of an ordered list from 1 ...
- In the
get_user_skills
, show theskills
(received from the parameter) to the user. Prompt the user to select 2skills
and return the twoskills
the user selected in a list. - In
get_user_cv
:- Create an empty dictionary called
cv
. This dictionary will then hold all of the applicant's information. - Ask the users for their name. Save the name in the
cv
dictionary with keyname
. - Ask the users for their age. Save the age in the
cv
dictionary with keyage
. - Ask the users for their years of experience. Save the years of experience in the
cv
dictionary with keyexperience
. - Add a key called
skills
, and assign it to the output ofget_user_skills
function. - Return the
cv
you have built thus far.
- Create an empty dictionary called
- In
check_acceptance
, returnTrue
if theirage
is between25
and40
, they have more than3
years ofexperience
, and thedesired_skill
is within theirskills
. - In the
main
function:print
a welcome message to this recruitment program.- Get the list of
skills
using theget_skills
function you created, and assign it to a variable calledskills
. - Call the
get_user_cv
function, passskills
to it, and assign the result to a variable calledcv
. - Check the applicant's acceptance using
check_acceptance
, and pass in two arguments: the cv and the 3rdskill
from your list ofskills
, created in Step 2, as the "desired_skill
". - If the applicant has been accepted, print a message to the user saying they're accepted (make sure the word "accepted" appears in that message.) Otherwise, print another message saying to the user they weren't accepted (make sure the word "rejected" appears in this message.)
Hint: To check if an element exists in a list, go here and scroll down to "Check if Item Exists".