7 kyu
Cat Years, Dog Years (2)
1,718 of 3,795dinglemouse
Description:
This is related to my other Kata about cats and dogs.
Kata Task
I have a cat and a dog which I got as kitten / puppy.
I forget when that was, but I do know their current ages as catYears
and dogYears
.
Find how long I have owned each of my pets and return as a list [ownedCat
, ownedDog
]
NOTES:
- Results are truncated whole numbers of "human" years
Cat Years
15
cat years for first year+9
cat years for second year+4
cat years for each year after that
Dog Years
15
dog years for first year+9
dog years for second year+5
dog years for each year after that
References
Fundamentals
Similar Kata:
Stats:
Created | Jan 28, 2018 |
Published | Jan 28, 2018 |
Warriors Trained | 7955 |
Total Skips | 226 |
Total Code Submissions | 29976 |
Total Times Completed | 3795 |
JavaScript Completions | 1718 |
Java Completions | 637 |
Ruby Completions | 117 |
Python Completions | 1168 |
C# Completions | 225 |
C Completions | 63 |
Groovy Completions | 9 |
Total Stars | 119 |
% of votes with a positive feedback rating | 90% of 754 |
Total "Very Satisfied" Votes | 628 |
Total "Somewhat Satisfied" Votes | 98 |
Total "Not Satisfied" Votes | 28 |
Total Rank Assessments | 5 |
Average Assessed Rank | 7 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 7 kyu |