Coding Kata’s

A useful tool for learning a new language or exploring ideas like TDD is to use code Kata’s. A Code Kata is a small, reasonably simple problem. Here are a few example code Kata’s I have used.

CalcStats

Your task is to process a sequence of integer numbers to determine the following statistics:

  • Minimum value
  • Maximum value
  • number of elements in the sequence
  • average value
  • Sum of all values
  • Is the total sum an odd or even number

Try using a technology you are not familiar with and bonus Kudos for using TDD

Scrabble Score

Given a word, compute the scrabble score for that word.

Letter Values:

1 – A,E,I,O,U<L,N,R,S,T

2 – D,G

3 – B,C,M,P

4 – F,H,V,W,Y

5 – K

8 – J,X

10 – Q,Z

Example:-

The word “Javascript” should return a score of 24.

Roman Numberals

Task #1

Write a function that converts an integer (up to a max value of 3,999) into Roman numberals

I = 1

V = 5

X = 10

L = 50

C = 100

D = 500

M = 1000

Example:-

2021 = MMXXI

3999 = MMMCMXCIX

Optional Task #2

Write a function that converts Roman numeral strings back to their integer value