We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c5d9bf5 commit 1e7a141Copy full SHA for 1e7a141
Python Programs/case_converter.py
@@ -0,0 +1,10 @@
1
+s = input("Enter a string: ")
2
+new_s = ""
3
+for c in s:
4
+ if 'A' <= c <= 'Z':
5
+ new_s += chr(ord(c) + 32)
6
+ elif 'a' <= c <= 'z':
7
+ new_s += chr(ord(c) - 32)
8
+ else:
9
+ new_s += c
10
+print("Converted string:", new_s)
0 commit comments