Computer Science, asked by deeksha19832, 8 months ago

write a function that recieves two string arguments and checks wether they are the same-length strings

Answers

Answered by gaganadithyareddy9
3

Answer:

Hey this is in python...

def check_length(s1, s2):

if len(s1) == len(s2):

print("Both strings are of same length...")

else:

print("Both strings are of different length...")

str1 = input("Enter a string: ")

str2 = input("Enter another string: "))

print(check_length(str1, str2))

# HOPE THIS HELPS YOU!!

Answered by prakharagrawal6055
1

Answer:

#definion of the program

def compare_strings(string1,string2):

   if len(string1)==len(string2):

       return True

   else:

       return False

#main progaram

st1=input("Enter first string:")

st2=input("Enter second string:")

print("Both string are of same length:",compare_strings(st1,st2))

Explanation:

Similar questions