Answer:
The code is attached.
Step-by-step explanation:
- the function accepts string as a parameter
- inside fuction there is a caunter variable initialized 0
- for every character in the string counter increases by 1
- returns final value of i as an integer, which is also the length of the string given