Challenge Overview
Introduction
Welcome to the Ninth Rapid Development Match Challenge!!
Rapid Development Matches or RDMs (as we love and would love the community to call them) are fast, timed software development competitions focused on ranking and scoring developers on code accuracy, speed, particular technologies, platforms, and development languages. The goal is clearly defined in the problems to be solved and the requirements to be achieved.
This is the Easy - 250 point problem of RDM-9
Please Note - The files linked in the specs will only be accessible after you register for the challenge.
Help Tina with her Coding Adventures!
Let's write a simple web app to calculate the value of simple mathematical expressions from English sentences.
Technical steps:
-
A website on port 8080 at /calculator
-
A text input field with id “query”
-
An input of type button with id “calculate” and the text “Calculate!”
-
A text div with id “result”
-
Pressing the button will calculate the value of the expression given in query and write it as the text content of the "result" div
-
If query is empty, output “Please enter a valid expression.”
-
If query is invalid, output “Invalid expression.”
-
If query is valid, output the value of the written expression, written-out in correct English (specified below).
Specification:
- A query will contain of at most five numbers in the range [ 0,10 ]
- A query can contain three types of operators: “plus”, “minus” and “times”
- Capitalization is not considered
- Write two digit numbers with a hyphen, as in "twenty-five" or "forty-three"
- Do not write any "and" between numbers. The number 105 should be written as "one hundred five", not "one hundred and five"
Example:
- One plus two plus three plus four plus five -> Fifteen
- Nine times ten plus nine -> Ninety-nine
- One times three -> Three
- Three times five -> Fifteen
- Ten times ten -> One hundred
- Three minus five-_> Minus two
- Ten times ten plus five -> One hundred five
Sample submissions
Below are sample submissions for both Python/Flask and for ExpressJS:
Below is a sample tester with which you can test your solutions locally:
Final Submission Guidelines
Submission Deliverables
Your submission must be a single ZIP file not larger than 10 MB containing just the code folder with the same structure as the one from the sample submission. The sample tester should not be included in the submission. Also make sure you don't submit any build folders generated locally like node_modules, dist etc. You must follow this submission folder structure so our automated test process can process your scoring:
Create a folder with “code” as the folder name then zip. Inside the “code” folder, there needs to be a file named Dockerfile. This is the docker file used to build the user’s submission. Refer to the provided Docker file in Sample Submission for each level. Zip that “code” folder and submit to the challenge. Execution Details and Submission Logs Each time you submit, the platform will leverage Docker to run your code. The execution logs will be saved as “Artifacts” that can be downloaded from the Submission Review App: https://submission-review.topcoder.com/.
Checking Passing and Failing Test Cases
Using the Submission Review App (https://submission-review.topcoder.com/), navigate to the specific challenge, then to your submission, and then to the Artifacts for your submission. The zip file you download will contain information about your submission including a result.json file with the test results.
Docker Structure:
Make sure you can run your submission with Docker from a clean slate. Your Docker needs to expose port: 8080. It needs to build on a completely clean machine when the platform runs your submission. If you are using something locally to build and run your submission, make sure it’s included as part of your Docker configuration as well. Please look at the sample submission to understand the structure better.