Friday, February 1, 2019

The length

  • Problem Description

    Write a Program to find the length of the given string.

    Hint: Use len 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("Length of string =",count)

  • Test Case 1

    Input (stdin)
    eLab in India
    
    
    Expected Output
    Length of string = 13
  • Test Case 2

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

No comments:

Post a Comment