Write a program to accept a string from the keyboard. Using character and string functions convert each letter of the string into its opposite case. Print the original and the new string. Count total number of lowercase, uppercase characters and the number of spaces in the new string and print them.
Answers
Answered by
0
I am telling you the code in python you can run it on https://onlinegdb.com/online_python_compiler
Your code is : -
a = "This is string"
b = a. upper()
print(a)
print(b)
if " " in a:
print("Double spaces is present! ")
else :
print("Double spaces not present")
double_spaces = a.count(" ")
print("Double spaces present is :", double_spaces)
Hope it helped....
Similar questions
Computer Science,
5 hours ago
History,
10 hours ago
Math,
10 hours ago
Biology,
8 months ago
English,
8 months ago