Retired
Calculator (retired)
1,402 of 11,547obrok
Description:
Create a simple calculator that given a string of operators (), +, -, *, / and numbers separated by spaces returns the value of that expression
Example:
Calculator.new.evaluate("2 / 2 + 3 * 4 - 6") # => 7
Remember about the order of operations! Multiplications and divisions have a higher priority and should be performed left-to-right. Additions and subtractions have a lower priority and should also be performed left-to-right.
Algorithms
Parsing
Logic
Strings
Expressions
Basic Language Features
Fundamentals
Similar Kata:
Stats:
Created | Sep 15, 2013 |
Warriors Trained | 33772 |
Total Skips | 5592 |
Total Code Submissions | 154298 |
Total Times Completed | 11547 |
Ruby Completions | 1402 |
Python Completions | 4902 |
C# Completions | 924 |
Java Completions | 1315 |
Haskell Completions | 200 |
JavaScript Completions | 2966 |
Total Stars | 1372 |
% of votes with a positive feedback rating | 82% of 1782 |
Total "Very Satisfied" Votes | 1290 |
Total "Somewhat Satisfied" Votes | 347 |
Total "Not Satisfied" Votes | 145 |