List of Programs-20.09.22
List of Programs-20.09.22
10. Write a Python script that takes input from the user and displays that input back in
upper and lower cases.
11. Write a Python program to count the number of characters (character frequency) in a
string.
Sample String : google.com'
Expected Result : {'g': 2, 'o': 3, 'l': 1, 'e': 1, '.': 1, 'c': 1, 'm': 1}
12. Write a Python program that accepts a hyphen-separated sequence of words as input
and prints the words in a hyphen-separated sequence after sorting them alphabetically.
13. Write a Python program to get a single string from two given strings, separated by a
space and swap the first two characters of each string. Go to the editor
Sample String : 'abc', 'xyz'
Expected Result : 'xyc abz'