Friday, February 1, 2019

Panagram

  • Problem Description

    Write a Python program to check whether the given string is Pangram or not

    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
  • from string import ascii_lowercase as asc_lower
    def check(s):
        return set(asc_lower) - set(s.lower()) == set([])
    strng=input()
    if(check(strng)==True):
          print("The string is a pangram")
    else:
          print("The string is not a pangram")
  • Test Case 1

    Input (stdin)
    The quick brown fox jumps over the lazy dog
    
    
    Expected Output
    The string is a pangram
  • Test Case 2

    Input (stdin)
    The quick green fox jumps over the lazy dog
    
    
    Expected Output
    The string is not a pangram

No comments:

Post a Comment