Menu Close

Check whether the given string is Panagram or not

Panagram or Pangram
A pangram or holoalphabetic sentence is a sentence using every letter of a given alphabet at least once. Pangrams have been used to display typefaces, test equipment, and develop skills in handwriting, calligraphy, and keyboarding. The best-known English pangram is”
The quick brown fox jumps over the lazy dog“.

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

Refer sample input and output for formatting specification.

Input:
The quick brown fox jumps over the lazy dog

Output:
The string is a pangram

from string import ascii_lowercase as asc_lower
def check(s):
    return set(asc_lower) - set(s.lower()) == set([])
strng=input("Enter the Sentence:  ")
if(check(strng)==True):
      print("The string is a pangram")
else:
      print("The string is not a pangram")


INPUT_1:
Enter the Sentence: The quick brown fox jumps over a lazy dog
OUTPUT:
The string is a pangram


INPUT_2:
Enter the Sentence:   The  five  boxing  wizards  jump  quickly
OUTPUT:
The string is a pangram


INPUT_3:
Enter the Sentence:   A  wizard’s  job  is  to  vex  chumps  quickly  in  fog
OUTPUT:
The string is a pangram


INPUT_4:
Enter the Sentence:   Waxy  and  quivering,  jocks  fumble  the  pizza
OUTPUT:
The string is a pangram


INPUT_5:
Enter the Sentence:   Wax  and  quivering,  jocks  fumble  the  pizza
OUTPUT:
The string is not a pangram


ILLUSTRATION

Executed using python3 linux terminal

Morae Q!

  1. Program to get dictionary items, use update module and items module.
  2. Regular expression allowing certain set of characters.
  3. Compute the Sum of Cosine Series.
  4. Find the Sum of Sine Series.
  5. Remove the Vowels from the string.
  6. Find All Non-Overlapping strings/characters using regular expressions .
  7. Check whether the given string is Panagram or not.
  8. Replacing strings using Regular Expression Regex.
  9. Check whether the given number is Strong number or not.
  10. Find the numbers divisible by a input numbers within the given range.
  11. Change the behaviour of the Regular Expression using flags.
  12. Find the exponentiation of a number.
  13. Find all prime numbers in a range using Sieve of Eratosthenes.
  14. Convert decimal equivalent into binary, hexadecimal and octal.
  15. Compute the area of a farmers field in feet.
  16. Compute time from number of days/hours to seconds.
  17. Precompiled patterns using Regular Expressions .
  18. Compute the price of the cake on the nth day.
  19. Compute the number of possible non-increasing arrays.
  20. Find the type of spinach using the calorie value.