QUESTION DESCRIPTION
Write a Python program to find the biggest string based on the length function.
The user should get two string inputs and compare the string
Print the longest or biggest string in the output.
If the strings are equal then print the message as "Both strings are equal"
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
Write a Python program to find the biggest string based on the length function.
The user should get two string inputs and compare the string
Print the longest or biggest string in the output.
If the strings are equal then print the message as "Both strings are equal"
Refer sample input and output for formatting specification.
All float values are displayed correct to 2 decimal places.
All text in bold corresponds to input and the rest corresponds to output.
a=input()
b=input()
c=len(a)
d=len(b)
if c > d:
print("Larger string is:")
print(a)
if d > c:
print("Larger string is:")
print(b)
if c ==d:
print("Both strings are equal")
Comments
Post a Comment