+ 2
What is problem in this code? Can you give me the right code!!
Suppose 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.you can use intersection operator. Complete the program to output the matched skill. According to this question what problem occurs in below code . Can you give me the solution skills = {'Python', 'HTML', 'SQL', 'C++', 'Java', 'Scala'} job_skills = {'HTML', 'CSS', 'JS', 'C#', 'NodeJS'} n = input() s = skills & job_skills if n in s: print(n)
7 ответов
+ 8
there is no input in that practice
print(*s)
+ 6
Mehak Parveen ,
the output in variable `s` is already done in your code and contains the correct value(s), we just have to print it without curly braces as string(s).
this can be done like:
...
for item in s:
print(item, end = ' ')
or as A͢J mentioned by using the depack operator `*`.
+ 4
It looks like you don't need to accept input.
https://www.sololearn.com/Discuss/2788435/?ref=app
+ 4
If I recall correctly, the output is not a set, but a string.
+ 4
Wilbur Jaywright in this context the & operator has operands that are sets. The & operator gets overloaded to become a set intersection operator.
https://www.pythontutorial.net/JUMP_LINK__&&__python__&&__JUMP_LINK-basics/python-set-intersection/
0
The & operator does not do what you think it does. It does not concatenate, it is a bitwise AND operator.
0
If you are using Java than use lambda operator to find matching skill. In both the input