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

Stats:

CreatedJan 28, 2018
PublishedJan 28, 2018
Warriors Trained7955
Total Skips226
Total Code Submissions29976
Total Times Completed3795
JavaScript Completions1718
Java Completions637
Ruby Completions117
Python Completions1168
C# Completions225
C Completions63
Groovy Completions9
Total Stars119
% of votes with a positive feedback rating90% of 754
Total "Very Satisfied" Votes628
Total "Somewhat Satisfied" Votes98
Total "Not Satisfied" Votes28
Total Rank Assessments5
Average Assessed Rank
7 kyu
Highest Assessed Rank
7 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • dinglemouse Avatar
  • Chrono79 Avatar
  • adrian.eyre Avatar
  • Blind4Basics Avatar
  • rowcased Avatar
  • KataSideKick Avatar
  • hobovsky Avatar
  • FranzMartyn Avatar
  • saudiGuy Avatar
Ad