4 kyu
Fluent Calculator
1,758 of 1,828lukasz-lysik
Description:
The Kata is inspired by Calculating with Functions Kata for JavaScript.
The goal is to implement simple calculator which uses fluent syntax:
Calc.new.one.plus.two # Should return 3
Calc.new.five.minus.six # Should return -1
Calc.new.seven.times.two # Should return 14
Calc.new.nine.divided_by.three # Should return 3
There are only four operations that are supported (plus, minus, times, divided_by) and 10 digits (zero, one, two, three, four, five, six, seven, eight, nine).
Each calculation consists of one operation only.
Mathematics
Metaprogramming
Similar Kata:
Stats:
Created | Dec 6, 2013 |
Published | Dec 6, 2013 |
Warriors Trained | 3910 |
Total Skips | 1260 |
Total Code Submissions | 7071 |
Total Times Completed | 1828 |
Ruby Completions | 1758 |
Total Stars | 123 |
% of votes with a positive feedback rating | 95% of 190 |
Total "Very Satisfied" Votes | 171 |
Total "Somewhat Satisfied" Votes | 18 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 7 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 5 kyu |