-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
598 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
!coverage.py: This is a private format, don't read it directly!{"arcs":{"/home/vpayno/git_vpayno/exercism-workspace/python/pangram/test/__init__.py":[[0,0],[0,-1]],"/home/vpayno/git_vpayno/exercism-workspace/python/pangram/pangram.py":[[0,1],[1,4],[4,-1],[4,15],[15,18],[18,18],[18,20],[20,-4],[15,16],[16,-4]]}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<?xml version="1.0" ?> | ||
<coverage branch-rate="0.75" branches-covered="3" branches-valid="4" complexity="0" line-rate="0.8333" lines-covered="5" lines-valid="6" timestamp="1713841617589" version="4.5.4"> | ||
<!-- Generated by coverage.py: https://coverage.readthedocs.io --> | ||
<!-- Based on https://raw.githubusercontent.com/cobertura/web/master/htdocs/xml/coverage-04.dtd --> | ||
<sources> | ||
<source>/home/vpayno/git_vpayno/exercism-workspace/python/pangram</source> | ||
</sources> | ||
<packages> | ||
<package branch-rate="0.75" complexity="0" line-rate="0.8333" name="."> | ||
<classes> | ||
<class branch-rate="0.75" complexity="0" filename="pangram.py" line-rate="0.8333" name="pangram.py"> | ||
<methods/> | ||
<lines> | ||
<line hits="0" number="0"/> | ||
<line hits="1" number="4"/> | ||
<line branch="true" condition-coverage="100% (2/2)" hits="1" number="15"/> | ||
<line hits="1" number="16"/> | ||
<line branch="true" condition-coverage="50% (1/2)" hits="1" missing-branches="exit" number="18"/> | ||
<line hits="1" number="20"/> | ||
</lines> | ||
</class> | ||
</classes> | ||
</package> | ||
<package branch-rate="1" complexity="0" line-rate="1" name="test"> | ||
<classes> | ||
<class branch-rate="1" complexity="0" filename="test/__init__.py" line-rate="1" name="__init__.py"> | ||
<methods/> | ||
<lines/> | ||
</class> | ||
</classes> | ||
</package> | ||
</packages> | ||
</coverage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[run] | ||
omit = __init__.py, *_test.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
../.pylintrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,20 @@ | ||
def is_pangram(sentence): | ||
pass | ||
"""Python Pangram Exercism""" | ||
|
||
|
||
def is_pangram(text: str) -> bool: | ||
"""Is the input a pangram? | ||
>>> text: set[str] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz" | ||
>>> len(sorted({r for r in text.lower() if r.isalpha()})) | ||
26 | ||
:param text: string | ||
:return: bool | ||
""" | ||
|
||
if not text or len(text) < 26: | ||
return False | ||
|
||
letters: set[str] = {r for r in text.lower() if r.isalpha()} | ||
|
||
return len(letters) == 26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
> """Python Pangram Exercism""" | ||
|
||
|
||
> def is_pangram(text: str) -> bool: | ||
> """Is the input a pangram? | ||
|
||
> >>> text: set[str] = " ABCDEFGHIJKLMNOPQRSTUVWXYZ[]^_`abcdefghijklmnopqrstuvwxyz" | ||
> >>> len(sorted({r for r in text.lower() if r.isalpha()})) | ||
> 26 | ||
|
||
> :param text: string | ||
> :return: bool | ||
> """ | ||
|
||
> if not text or len(text) < 26: | ||
> return False | ||
|
||
> letters: set[str] = {r for r in text.lower() if r.isalpha()} | ||
|
||
> return len(letters) == 26 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pytest] | ||
pythonpath = . | ||
addopts = --doctest-modules | ||
markers = | ||
task: exercise task/step |
Oops, something went wrong.