Dcoder icon

Pangram @ Dcoder

By Lochard | As a newbie programmer | 6 Apr 2023


Problem: A word or a sentence is called a pangram if all the characters of this language appear in it at least once, either in lowercase or in uppercase. You are given a string S consisting of lowercase and uppercase English letters. If the string is a pangram, print "YES" else print "NO", without the double quotes.

Input: A single string S.

Output: Print "YES", if the string is a pangram, else print "NO".

Constraints: 1 ≤ S.length ≤ 100

Sample Input: QuickWaftingZephyrsVexBoldJim

Sample Output:  YES

from string import ascii_uppercase
s = input().upper()
pangram = 'YES'
for ch in ascii_uppercase:
  if ch not in s:
    pangram = 'NO'
    break
print(pangram)

How do you rate this article?

6


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.