0
Help with int python 6.2 practice
For those willing to help but not able to see I will type the problem: You are working on a recruitment platform which should match the available jobs and the candidates based on their skills. The skills required for the job, and the candidate's skills are stored in sets. Complete the program to output the matched skill. [You can use the intersect operator to get the values present in both sets.] It starts with: Skills={'Python','HTML','SQL','C++','Java','Scala'} Job_skills={'HTML','CSS','JS','C#','NodeJS'} I added this line: Print(skills.intersection(job_skills)) I don't know what I am missing? I thought it just wanted me to print the intersecting values and I have done it so what am I missing here?
9 Antworten
+ 4
SeveredData
Not a good idea but I have solved by doing this
sk = skills & job_skills
print (sk.pop())
+ 2
SeveredData
Or you can do like this too:
sk = skills & job_skills
print (*sk)
+ 2
Thank you so much I just wrote down all 3 for me to run through and add to my info♡
+ 1
My output is currently {'HTML'}
Do you think I should get rid of the {''}?
+ 1
It never specified and the only test result is locked so I can't view it
0
SeveredData
You can use * to remove {}
sk = skills.intersection(job_skills)
print (*sk)
0
skills = {'Python', 'HTML', 'SQL', 'C++', 'Java', 'Scala'}
job_skills = {'HTML', 'CSS', 'JS', 'C#', 'NodeJS'}
jobs = skills & job_skills
for i in jobs:
print(i)
0
skills = {'Python', 'HTML', 'SQL', 'C++', 'Java', 'Scala'}
job_skills = {'HTML', 'CSS', 'JS', 'C#', 'NodeJS'}
jobs = skills & job_skills
for i in jobs:
print(i)
0
Thank you so much!!