Answers for "acronym generator in python"

0

acronym generator in python

def main():

    ## input the phrase
    phrase = input("Enter the phrase: ")

    ## split the phrase into substrings
    phrase_split = phrase.split()


    acronym = ""

    ## iterate through every substring
    for i in phrase_split:
        acronym = acronym + i[0].upper()

    print("The acronym for your phrase is ",acronym + ".")

main()
Posted by: Guest on April-11-2020

Python Answers by Framework

Browse Popular Code Answers by Language