Lucky Direction
ABC 391Problem 25 of 50
EasyWhat to do
You will receive a direction as a letter (like 'N' for North or 'E' for East). Your task is to find and print the opposite direction (for example, if you get 'N', you should print 'S' for South).
Key Concepts
if-statements
string manipulation
input and output
Examples
Input:
'N'
Output:
S
Input:
'SE'
Output:
NW
Tips for Beginners
- Focus on understanding the logic, not memorizing syntax
- Use print statements to debug your code
- Don't worry about input parsing - the function handles that for you
- If stuck, try writing out your solution on paper first
Python Editor
Loading Python...