Question: in Python, can you help me make this code? 1. The four compass points can be abbreviated by single-letter strings as N ,

in Python, can you help me make this code?
in Python, can you help me make this code? 1. The four

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!