Question: in Python, can you help me make this code? 1. The four compass points can be abbreviated by single-letter strings as N ,
1. The four compass points can be abbreviated by single-letter strings as " N ", " E ", " S ", and "W". Write a function turn clockwise that takes one of these four compass points as its parameter, and returns the next compass point in the clockwise direction. Here are some tests that should pass: \[ \begin{array}{l} \text { test }(\text { turn_clockwise ("N") }==\text { E") } \\ \text { test (turn_clockwise ("W") }=\text { "N") } \end{array} \] You might ask "What if the argument to the function is some other valye?" For all other cases, the function should return the value None: \[ \begin{array}{l} \text { test (turn_clockwise }(42)=\text { None) } \\ \text { test(turn_clockwise ("rubbish") }=\text { None) } \end{array} \]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
