how to solve a practical task? course developer python->Collection Types->Sets ?? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
0

how to solve a practical task? course developer python->Collection Types->Sets ??

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. skills = {'Python', 'HTML', 'SQL', 'C++', 'Java', 'Scala'} job_skills = {'HTML', 'CSS', 'JS', 'C#', 'NodeJS'} My results - dont work, why? skills = {'Python', 'HTML', 'SQL', 'C++', 'Java', 'Scala'} job_skills = {'HTML', 'CSS', 'JS', 'C#', 'NodeJS'} matched_skills = skills & job_skills print(matched_skills)

12th Sep 2023, 4:54 PM
Kovalchuk Olexander
Kovalchuk Olexander - avatar
4 Antworten
+ 2
Kovalchuk Olexander your result should be string, not a set. print(*matched_skills)
12th Sep 2023, 5:10 PM
Alexey Kopyshev
Alexey Kopyshev - avatar
+ 2
Kovalchuk Olexander Unfortunately it is not written in the task, but the test wants exactly the string
12th Sep 2023, 5:18 PM
Alexey Kopyshev
Alexey Kopyshev - avatar
+ 1
Thank you again for your help, have a nice day
12th Sep 2023, 5:23 PM
Kovalchuk Olexander
Kovalchuk Olexander - avatar
0
Thank you very much, but can you explain why you need to make a string?
12th Sep 2023, 5:16 PM
Kovalchuk Olexander
Kovalchuk Olexander - avatar