/Katas

A collection of code katas for practice during Academy (and otherwise)

Primary LanguageC#

Collection of Katas for Academy Pittsburgh

[Roman Numerals](/Roman Numerals)

Convert Arabic numerals to Roman. ie 5 returns V, 12 returns XII.

Difficulty: Easy


Reverse

Write a method that will take a string as input, and return a new string with the same letters in reverse order.

Don't use String's reverse method; that would be too simple.

Difficulty: easy


Factorial

Write a method that takes an integer n in; it should return the result of n*(n-1)*(n-2)*...*(n-(n-1)). Assume n >= 0.

As a special case, factorial(0) == 1

Difficulty: easy.


Longest Word

Write a method that takes in a string. Return the longest word in the string. You may assume that the string contains only letters and spaces. You may use the String split method to aid you in your quest.

Difficulty: easy.


Sum it up

Write a method that takes in an integer num and returns the sum of all integers between zero and num, up to and including num.

Difficulty: easy.