Job offer

Report a typo

You can offer a role of a Kotlin developer to several candidates.

Your company has a special rule written in Kotlin for decision-making.

val offerAJob = 
        (knowKotlin && yearsOfExperienceInKotlin >= 1) || 
        (knowPython && yearsOfExperienceInPython >= 3)

A small explanation:

  • knowKotlin is a boolean variable that shows whether a candidate knows Kotlin.

  • knowPython is a boolean variable that shows whether a candidate knows Python.

  • yearsOfExperienceInKotlin is an int variable that shows how many years of Kotlin programming a candidate has.

  • yearsOfExperienceInPython is another int variable that shows how many years of Python programming a candidate has.

Here is our list of candidates with their skills:

  • John: knowKotlin = true; yearsOfExperienceInKotlin = 1; knowPython = false; yearsOfExperienceInPython = 0;

  • Mary: knowKotlin = false; yearsOfExperienceInKotlin = 0; knowPython = true; yearsOfExperienceInPython = 3;

  • Olivia: knowKotlin = true; yearsOfExperienceInKotlin = 0; knowPython = true; yearsOfExperienceInPython = 2;

  • Alexander: knowKotlin = true; yearsOfExperienceInKotlin = 3; knowPython = true; yearsOfExperienceInPython = 2;

  • Andrew: knowKotlin = false; yearsOfExperienceInKotlin = 1; knowPython = false; yearsOfExperienceInPython = 1;

  • Emily: knowKotlin = false; yearsOfExperienceInKotlin = 0; knowPython = true; yearsOfExperienceInPython = 2;

Select all the suitable candidates.

Note that sometimes a candidate may have programming experience but may lack programming language knowledge. Let's consider it a false.

Select one or more options from the list
___

Create a free account to access the full topic