Open
Description
Simple Acronym Generator
def generate_acronym(phrase):
words = phrase.split() # Split the phrase into words
acronym = ""
for word in words:
acronym += word[0].upper() # Take the first letter of each word
return acronym
Example usage
phrase = "Python Yields Terrific Hacking Opportunities Now"
print(generate_acronym(phrase)) # Output: PYTHON
Metadata
Metadata
Assignees
Labels
No labels