Question: In python write a program for the following: The four compass points can be abbreviated by single - letter strings as N , E ,
In python write a program for the following: The four compass points can be abbreviated by singleletter strings as NES and W Write a function turnclockwise compasspoint:str that takes one of these four compass points as its parameter, and returns the next compass point in the clockwise direction. If compasspoint has another value that's distinct from the four compass points listed earlier, return the value None
Input:
String representing a cardinal direction
Output:
String representing a cardinal direction that is a degree clockwise turn from the input cardinal direction.
Example Cases:
turnclockwiseNE
turnclockwiseWN
turnclockwiseSW
turnclockwiseES
turnclockwise None
turnclockwiserubbish None
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
