Question: Use python to code Rewrite the following code following the DRY principle (Don't Repeat Yourself). You should assume that x can't be any value other
Use python to code

Rewrite the following code following the DRY principle (Don't Repeat Yourself). You should assume that x can't be any value other than 1, 2, 3, or 4. if x == 1: print ("You are the first respondent") elif x == 2: print ("You are the second respondent") elif x == 3: print ( "You are the third respondent") elif x == 4: print ( "You are the fourth respondent")
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
