To start with something simple, let’s create a lottery app. We want it to randomly select the winning person, from a list of names. Below, you can see the instructions, our program:
Select a random item from ['Julia', 'Mike', 'Dan', 'Oliver', 'Eva']. Print it
Parametrizing your app with inputs
Now, let’s say we instead want to let the user say a number to pick the lucky winner. For that case, we add an input that will be used by the App in each execution. To that end, we write the following program:
Select the lucky_number value from ['Julia', 'Mike', 'Dan', 'Oliver', 'Eva']. Print it
Example with numbers
So far, we haven’t done anything with numbers, so here goes one.
Create a list of all the numbers up to 10. For each number in the list, check if it is even and if so, print it.
We can’t wait to see what you build Hupreter. Please don’t hesitate to contact us at firstname.lastname@example.org if you need any help.