8 kyu
Total amount of points
35,078 of 115,527petrosernivka
Description:
Our football team has finished the championship.
Our team's match results are recorded in a collection of strings. Each match is represented by a string in the format "x:y"
, where x
is our team's score and y
is our opponents score.
For example:
["3:1", "2:2", "0:1", ...]
Points are awarded for each match as follows:
- if x > y: 3 points (win)
- if x < y: 0 points (loss)
- if x = y: 1 point (tie)
We need to write a function that takes this collection and returns the number of points our team (x
) got in the championship by the rules given above.
Notes:
- our team always plays 10 matches in the championship
- 0 <= x <= 4
- 0 <= y <= 4
Fundamentals
Arrays
Strings
Similar Kata:
Stats:
Created | Oct 6, 2018 |
Published | Oct 6, 2018 |
Warriors Trained | 191805 |
Total Skips | 15276 |
Total Code Submissions | 258611 |
Total Times Completed | 115527 |
Python Completions | 35078 |
JavaScript Completions | 45791 |
C Completions | 2388 |
NASM Completions | 40 |
Haskell Completions | 650 |
Ruby Completions | 1879 |
Java Completions | 10635 |
C# Completions | 5461 |
Go Completions | 3439 |
Reason Completions | 26 |
PHP Completions | 2528 |
Scala Completions | 454 |
C++ Completions | 5870 |
Elixir Completions | 285 |
Julia Completions | 91 |
Racket Completions | 54 |
Factor Completions | 26 |
Kotlin Completions | 1621 |
COBOL Completions | 30 |
Rust Completions | 1064 |
Clojure Completions | 117 |
TypeScript Completions | 1281 |
CoffeeScript Completions | 13 |
F# Completions | 23 |
Dart Completions | 104 |
Lua Completions | 45 |
Total Stars | 1694 |
% of votes with a positive feedback rating | 92% of 7849 |
Total "Very Satisfied" Votes | 6753 |
Total "Somewhat Satisfied" Votes | 980 |
Total "Not Satisfied" Votes | 116 |
Total Rank Assessments | 10 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |