NatWest Group Interview Question

Write code to find the frequency of a character in a string.