Computer Science, asked by aidenroyrichared, 10 hours ago

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 sarthakparmarjaunpur
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