Help me in solving PYTH99A problem

My issue

help

My code

# Count how many 'o's are present in the string using a 'for' loop and 'if' condition

string = 'bolloon'

# Initialize a variable to store the count
count_of_o = 0


for char in string:
    
    if char == 'o':
        
        count_of_o += 1

print("Count of 'o's:", count_of_o)

Learning course: Python with Data structures
Problem Link: CodeChef: Practical coding for everyone

The code for that can be

def count_o_in_strings:
return s.count(‘o’)
string = “bollon”
result = count_o_in_strings(bollon)
print(f"the number of 'o’s in the sting is : {result})

hope you get it