Question: USE ONE OF THOSE ABOVE APPROPRIATE FOT THE QUESTION.THE FUNCTION AND THE OUTPUT OF THE CODE HAVE ALREADY BEEN GIVEN SO JUST WRITE THE CODE
USE ONE OF THOSE ABOVE APPROPRIATE FOT THE QUESTION.THE FUNCTION AND THE OUTPUT OF THE CODE HAVE ALREADY BEEN GIVEN SO JUST WRITE THE CODE TO PROVIDE THE SAME OUTPUT WHICH HAVE BEEN GIVEN IN THE QUESTION. USE PYTHON3 PROGRAMING.
Yay Or Boo
Write a function called YayOrBoo which takes in a float in a string format, which we will consider a percentage representing a grade. Given this float return the following output: 80.0 and above: Yay! You had one of the best scores in the class with a score of % 65.0 - below 80: You passed the class with a score of % Below 65: Boo! You failed the class with a score of %
Examples
Input: \"80.0\" Output: Yay! You had one of the best scores in the class with a score of 80.0%
Input: \"1.0\" Output: Boo! You failed the class with a score of 1.0%
USE THE FUNCTION BELOW.
def YayOrBoo(strParam):
# code goes here
return strParam
# keep this function call here
print(YayOrBoo(input()))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
