In this program, we will take a string as input and calculate the length of a string with loop logic
Steps to solve the proram
- Take a string as input and create a variable and assign its value equal to zero.
- Use For loop to iterate over each character of the string.
- After each iteration add 1 to the variable to find the length of the string.
- To verify our solution find the length of the string using built it function len().
- Print the output.
Output :