'Displaying text when the user input invalid but continuing when it is valid
Whenever exercise_type is not one of the options in the table, display "Invalid type of exercise" in the output/console screen instead. Whenever difficulty_level is not one of the options in the table, display "Invalid difficulty level" in the output/console screen instead. Concept(s) to Apply:
- Nested if/elif/else
- int()
- input()
- Variables
- print()
This is part of my whole assignment but im having trouble doing this using only these concepts. There are 4 exercise types (arms, legs, core, yoga) and 4 difficulty levels (1,2,3,4) But I cannot figure out how to do this. I am very much new to coding. The tables are already completed and they display properly but I am stuck here.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
