Friday, February 1, 2019

Length Without Library

  • Problem Description

    Write a python program to find the length of the given string without using Library Function

    Refer sample input and output for formatting specification.

    All float values are displayed correct to 2 decimal places.

    All text in bold corresponds to input and the rest corresponds to output.
  • CODING ARENA
  • string=input()
    count=0
    for i in string:
          count=count+1
    print(count)
  • Test Case 1

    Input (stdin)
    eLab in India
    
    
    Expected Output
    13
  • Test Case 2

    Input (stdin)
    eLab tool has bee used by 40000 users in Tamilnadu alone
    
    
    Expected Output
    56

No comments:

Post a Comment