This is the problem<div><br></div><div><div>Implement a function called get_direction which, on a particular character</div><div>, gives the</div><div>direction corresponding to that character. The correspondences are as follows:</div>
<div> The character ’w’ corresponds to the direction ’North’</div><div> The character ’a’ corresponds to the direction ’West’</div><div> The character ’s’ corresponds to the direction ’South’</div><div> The character ’d’ corresponds to the direction ’East’</div>
<div><br></div><div><br></div><div>I am having difficulty coming up with a function and testing it as well.</div><div><br></div><div>I have tried </div><div><br></div><div><div>def get_direction(self):</div><div>        """</div>
<div>        whenever a key is pressed the character moves to</div><div>        the direction corresponding to the key</div><div>        """</div><div>        'North':w</div><div>        'South': s</div>
<div>        'East' : d</div><div>        'West' : a </div></div><div><br></div><div>but it didn't work...please help.</div>-- <br><font style="color:rgb(255,0,0)" size="4"><i><font face="georgia,serif">Akuma</font></i></font><br>

</div>