Skip to the content

Did they pass the class?

Problem

You pass this class if you scored 60 points or more and you skipped no more than 5 classes. Both have to be true at once: 90 points with 8 skipped classes doesn't pass.

Return true if score and skipped are enough to pass, false if they aren't. Both limits count in your favor: exactly 60 and exactly 5 pass.

Examples

  • 75, 2 → true

  • Short on points

    58, 0 → false

  • Skipped too much

    90, 8 → false

Besides these, the challenge has hidden tests that are revealed when you submit your solution.

You start with this

Python

def passed(score, skipped):
    pass

JavaScript

function passed(score, skipped) {
}
Solve this challenge

It opens in your browser, with the editor and the tests. It is free and you do not need an account to start.

More O(1) challenges

See all challenges →