Percentage of passing students Module 5.2 15


The question is to find the percentage of student who passed, after almost one hour going back and forth with this, I cannot foresee the solution arriving anytime soon… can someone please explain?

total_students = int(input(“How many students are in the class?”))
passing_students = int(input(“How many students passed this test?”))

def find_percentage():
percentage = passing_students / total_students

percentage = int(find_percentage() * 100)
print("The percentage of students who passed is " + str(percentage) + “%”)

How many students are in the class?36
How many students passed this test?9
Traceback (most recent call last):
File “”, line 7, in
percentage = int(find_percentage() * 100)
TypeError: unsupported operand type(s) for *: ‘NoneType’ and ‘int’


found it… :grin: just took longer to look at it