Question Answered step-by-step Suppose your favorite happy emoticon is the Japanese-style,…Suppose your favorite happy emoticon is the Japanese-style, ^_^.  Since the semester is almost over, we are so happy that we want more underscores, so let’s use 3 of them as in: ^___^. Write a Python scr

Question Answered step-by-step Suppose your favorite happy emoticon is the Japanese-style,…Suppose your favorite happy emoticon is the Japanese-style, ^_^.  Since the semester is almost over, we are so happy that we want more underscores, so let’s use 3 of them as in: ^___^. Write a Python script to read in a number that indicates how happy your emoticon should be. Your program should work with any positive whole number from 1 to 5. Any other input value is invalid. The program should then display the happy emoticon with the correct number of underscore characters or state the user input is invalid. +10 points:For an additional 10 points, write your solution to the above using a function. Please write your function using the following header:    def happyEmoticon(n):That is, this function accepts an integer argument to specify the “happiness” (the number of underscores). It returns a string representing the happy emoticon or an error message like “invalid”. If you can do this second part, don’t turn in a separate solution to the first part. Need to be able to have the program ask for user input with eval(inputComputer Science Engineering & Technology Python Programming CIS 115

Leave a Comment

Your email address will not be published. Required fields are marked *

Order your essay today and save 30% with the discount code ESSAYHELP