Lucky Direction ABC 391 Completed

Problem 25 of 50

Easy

lightbulb What 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

code Python Editor
Loading Python...
Test Results
tips_and_updates 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