class percentage calculation

A student will not be allowed to sit in exam if his/her attendence is less than 75%.
Take following input from user
Number of classes held
Number of classes attended.
And print
percentage of class attended
20
16
Total : 1 Discussion
Login
Pragathi Sundaralingam
    
a=int(input())
b=int(input())
percent=(a/b)*100
print(f"percentage of attendance : {percent:.2f}%")
Reply