Created
January 19, 2021 03:41
-
-
Save ayubmetah/090a326954e3ef1b36870170e378537d to your computer and use it in GitHub Desktop.
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".
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def student_grade(name, grade): | |
# return "" | |
return "{} received {}% on the exam".format(name, grade) | |
print(student_grade("Reed", 80)) | |
print(student_grade("Paige", 92)) | |
print(student_grade("Jesse", 85)) |
Thanks for the piece of code, I did a project in college and used it. I was uploading essays for students from https://writix.com/essay-examples/law and using this code to mark who had what work. It came out pretty good and I think we can do it again.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
that's great. thank you, it helped me a lot to check whether i also written this code right or wrong.