defget_planet_name_by_id(id):ifid==1:return"Mercury"elifid==2:return"Venus"elifid==3:return"Earth"elifid==4:return"Mars"elifid==5:return"Jupiter"elifid==6:return"Saturn"elifid==7:return"Uranus"elifid==8:return"Neptune"return"Planet Index doesn't exist"
this is the correct answer (: Python intentionally shunned the switch statement because it's easy to make mistakes, especially with languages which allow fall-through (:
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm gonna do the traditional way:
this is the correct answer (: Python intentionally shunned the switch statement because it's easy to make mistakes, especially with languages which allow fall-through (: