'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:

  1. Nested if/elif/else
  2. int()
  3. input()
  4. Variables
  5. 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