Basketball Points Easy

+50 PTS

Before you start the test, check out our tutorial challenge

  • TYPE CODE PRACTICE CHALLENGE
  • LANGUAGES BASH, C, C++, C# AND 20 MORE
    LANGUAGES BASH, C, C++, C#, CLOJURE, ELIXIR, ERLANG, GO, GROOVY, HASKELL, JAVA, JAVASCRIPT, JULIA, KOTLIN, NIM, PERL, PHP, PYTHON2, PYTHON, RUBY, RUST, SWIFT, TYPESCRIPT, VB
  • TIME ~60MIN

Basketball Points

Challenge outline

Hello and welcome to the challenge!


Write a code which counts points that our basketball team earned in the series of matches. Match results are given in x:y format, where x means our score in a match. Rules of points counting:

  • if x>y we earn 3 points
  • if x=y we earn 1 point
  • if x<y we earn 0 points


Have fun and good luck! :)