فرصة تطوعية مميزة لطلاب وطالبات الجامعة والمهتمين بالعمل الحر
| Anagram Listen = Silent |
[1] An anagram is a word or phrase formed by rearranging the letters of a different word or phrase, typically using all the original letters exactly once.[1] For example, the word binary into brainy and the word adobe into abode. The original word or phrase is known as the subject of the anagram. Any word or phrase that exactly reproduces the letters in another order is an anagram.
Now, lets see the lab question.
An anagram is a new word formed by rearranging the letters of a word, using all the original letters exactly once. For example, the phrases "rail safety" and "fairy tales" are anagrams, while "I am" and "You are" are not.
Your task is to write a program which:
Note:
Test your code using the data we've provided.
Sample input:
Sample output:
Anagrams
Sample input:
Sample output:
Not anagrams
Can you come up with a shorter / better solution? Please mention it in the comments 👀
References
1. Wikipedia contributors. (2022, February 1). Anagram. Wikipedia. Retrieved February 5, 2022, from https://en.wikipedia.org/wiki/Anagram
Comments
Post a Comment
Your opinion matters, your voice makes us proud and happy. Your words are our motivation.