224k views
2 votes
Write the program to convert the string “ SOFTware” into lower case ,”hardware “ string into upper case.

Combine the two strings and find the length of the combined string.

User Wils
by
7.1k points

1 Answer

5 votes

Answer:

The program in Python is as follows:

str1 = " SOFTware".lower()

str2 = "hardware ".upper()

str3 = str1+str2

lent = len(str3)

print(lent)

Step-by-step explanation:

(1) Convert " SOFTware" to lower

str1 = " SOFTware".lower()

(2) Convert "hardware " to upper

str2 = "hardware ".upper()

(3) Combine both strings

str3 = str1+str2

(4) Calculate the length of the new string

lent = len(str3)

(5) Print the calculated length

print(lent)

User Jeremy Salwen
by
7.2k points