8 kyu
Total amount of points
36,184 of 118,503petrosernivka
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 | 196205 |
Total Skips | 15627 |
Total Code Submissions | 264202 |
Total Times Completed | 118503 |
Python Completions | 36184 |
JavaScript Completions | 46674 |
C Completions | 2440 |
NASM Completions | 41 |
Haskell Completions | 661 |
Ruby Completions | 1900 |
Java Completions | 10901 |
C# Completions | 5608 |
Go Completions | 3563 |
Reason Completions | 26 |
PHP Completions | 2575 |
Scala Completions | 458 |
C++ Completions | 6097 |
Elixir Completions | 293 |
Julia Completions | 92 |
Racket Completions | 56 |
Factor Completions | 26 |
Kotlin Completions | 1659 |
COBOL Completions | 31 |
Rust Completions | 1111 |
Clojure Completions | 120 |
TypeScript Completions | 1339 |
CoffeeScript Completions | 13 |
F# Completions | 25 |
Dart Completions | 138 |
Lua Completions | 57 |
Perl Completions | 3 |
Total Stars | 1723 |
% of votes with a positive feedback rating | 92% of 7952 |
Total "Very Satisfied" Votes | 6833 |
Total "Somewhat Satisfied" Votes | 1002 |
Total "Not Satisfied" Votes | 117 |
Total Rank Assessments | 10 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |