In this section, you will find a step by step to manipulate basic inputs on Ritchie.
Basic 1: Inputs
On this tutorial, the idea is to teach you how to create a formula on Ritchie that will sum two positive numbers.
rit math sum numbers
This formula needs to contain (at least) those two inputs parameters, see below:
- Number one (
- Number two (
Step by step
The formula needs to follow the next steps:
- Extract all inputs parameters.
- Convert inputs to integers (there is currently no integer
type in inputs config.json file).
- Sum both numbers.
- Return the result on the terminal.
Well done! You’ve completed the first task!
If you want to play a little more, here are some suggestions:
- Add a validation of the input parameters to return an error to the user if the parameter is not an integer.
- Allow the user to sum negative numbers with positive ones.
- Allow the user to digit decimals in addition to integers.
👉 If you’ve completed the first tutorial, let’s go to the basic 2 task!
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.