-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpete_pangram.py
34 lines (27 loc) · 1.43 KB
/
pete_pangram.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#
# -----------------------------------------------------
# REFERENCES
# I'd like to say I'm the super programmer who can pull code out of the air. But I'm a googler >.<
# https://www.geeksforgeeks.org/python-program-to-check-if-given-string-is-pangram/
# https://www.thetopsites.net/article/55265024.shtml
# https://docs.python.org/2/tutorial/classes.html
# https://pep8.org/#module-level-dunder-names
# https://dbader.org/blog/python-dunder-methods
# Sphinx Documentation: https://medium.com/better-programming/auto-documenting-a-python-project-using-sphinx-8878f9ddc6e9
# : https://sphinx-rtd-tutorial.readthedocs.io/en/latest/read-the-docs.html#changing-the-settings
# -----------------------------------------------------
#example pangram: The five boxing wizards jump quickly
import string
from pangram_classes import PangramChecker
# Variable
# let user enter the sentence of their choosing.
sentence = input("Enter your sentence here... (Steve not Pete): ")
# create object
check = PangramChecker(sentence)
# checks if sentence passes the sentence through the 'ispangram' test. Then prints True.
if(check.is_pangram()):
print("True", "'", sentence, "'", "is a pangram.")
# if sentence fails pangram test then send it through 'missing_letters' to see what letters are missing and print them.
else:
print("False", "'", sentence, "'", "is NOT a pangram.", "\n",
"You're missing: ", check.missing_letters())