Modify the student_grade function using the format method, so that it returns the phrase "X received Y% on the exam". For example, student_grade("Reed", 80) should return "Reed received 80% on the exam".
Answers
Answered by
0
Answer:
d zh zuxxjsjtyVnaHxjahvzafjgFadhshc
Answered by
4
Language used: Python programming
Program:
def student_grade(name,percentage):
return "{0} received {1}% on the exam".format(name,percentage)
print(student_grade(input("Enter the name: "),int(input("Enter the percentage: "))))
Input:
Enter the name: Reed
Enter the percentage: 80
Output:
Reed received 80% on the exam
Learn more:
1. The format_address function separates out parts of the address string into new strings: house_number and street_name, and returns: "house number X on street named Y".
https://brainly.in/question/17931347
2. Printing all the palindromes formed by a palindrome word.
brainly.in/question/19151384
Attachments:
Similar questions