Options
In this sub-chapter you will learn how to specify options for your program and how to add error messages.
In the next tabs, there are again exercises for you to practice with. If you would like to have a slow start into the exercises, please use the "More practice"-exercise. Otherwise, you can directly dive into the standard exercise. This will contain more complex tasks. Don't be overwhelmed, but just try to solve these step-by-step. If you feel you need more practice beforehand, you can still go back to the "More practice"-exercise.
Slides
Video: options
Example: options
Overview syntax II
Useful thoughts/checks
If you write a program, think about:
- Do you want to put something to the return/ereturn list?
- What input do you need? What should be specified or chosen by the user?
- Can the syntax command take care of it? Note that there might be different possibilities how to specify it.
- Do you need error checks? If the user can choose between different options or there is input the syntax cannot fully check, an error check is recommendable.
- Where might if-branches be needed?
- After running the program, will the dataset/working space be the same except for the required changes?