Answered You can hire a professional tutor to get the answer.

QUESTION

Part 4 Your program is a hit! Your first customer is Mr. Justin Bieber, who's hit song Baby needs a little bit of work: The lyrics to...

Lyrics to the Song:

  • Attachment 1
  • Attachment 2
  • Attachment 3
  • Attachment 4
  • Attachment 5
Part 4Your program is a hit! In fact, some famous recording artists have come to you to help them re-write some of their most popular songs so that they aren't so "repetitive". Your firstcustomer is Mr. Justin Bieber, who's hit song "Baby" needs a little bit of work:The lyrics to this song is stored in a text file named "bieber_baby.txt" which was included in the main download for this assignment above.Justin doesn't want you to change ALL of his lyrics - just a few here and there to add some variety. Begin by asking the user for a "chance" value - this value dictates the % chancethat a given word will be substituted with one in the thesaurus. Finally, open the file and swap out words using the "chance" value supplied (e.g. the word is "happy" and the chance is0.5 - this word is in the thesaurus, so there is a 50% chance that we would swap it with a random word from the thesaurus and a 50% chance that we will leave it as-is). Words thatare swapped should be printed in all UPPERCASE letters. Here's a sample running of your program (note that you can simply remove all punctuation from the source file for thisprogram):Total number of words in the gutenberg. org version of Roget's thesaurus: 33055Enter a % chance to change a word: 0.5oh whoaoh whoaoh whoayou know you REGARD me i know ETHICAL SELF carejust shout whenever and ill be thereyou are my love you are my INNER NATUREand we will NOT A BIT IN ANY WAY ever be RETIREDare we an INSTANCE SUBTEENER ABJURE WAGERINGwere just friends what are you TEACHINGsay theres another and look right in my eyesmy INAUGURAL YOUNG MAN DEAD my heart for the first MARCH TEMPOand i was IN KINDLAMBKIN baby TOMATO ooohDOTE ON baby DAMSEL baby noooPHONY FLEDGLING baby baby ooohi thought youd INFLEXIBLY GO ON mine
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question