To check two input words / strings are same or different

 word1 = input("Enter the first word: ")

word2 = input("Enter the second word: ") if word1 == word2: print("The words are the same.") else: print("The words are different.") Here, the program prompts the user to enter two words (`word1` and `word2`) as inputs. It then compares the two words using the `==` operator. If the two words are the same, it prints "The words are the same." Otherwise, it prints "The words are different."

Comments

Popular posts from this blog

# prompt: python program to generate fibonacci series

Yes, Python is an object-oriented programming (OOP) language, but it is also a multi-paradigm language

Your task is to find the missing number.