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?

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

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

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

I am having this same error. I also wrote this same code, however, now i have messed with it.

Do I have to list arguments for the function find_percentage() in the initial parenthesis? Or do the arguments get put in the print line? Basically, I don’t understand user defined functions.

def find_percentage(x, y):
return (x/y)

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