Advertisement
Adehumble

Week3 Coding Exercise 6

Feb 11th, 2020
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.21 KB | None | 0 0
  1. #6
  2. def up_and_down(string):
  3.     if string.isupper():
  4.         print(string.lower())
  5.     elif string.islower():
  6.         print(string.upper())
  7.     else:
  8.         print(string.swapcase())
  9.  
  10. word=input("Enter anything: ")
  11. up_and_down(word)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement