It is a question that I encountered in a competitive programming site. The question asked to return the value count/n
I have attached my codes and I only want to know how to write the return statement. And note that the output should be of the format count/n and not in decimals.
What I have tried:
def printer_error(s):
count = 0
n = len(s)
for i in s:
if i in ["n","o","p","q","r","s","t","u","v","w","x","y","z"]:
count += 1