Compare commits

..

3 Commits

Author SHA1 Message Date
waldek 70e0ec408a adds a screenshot 2021-05-24 16:52:12 +02:00
waldek 14322caf3e fixes the empty answer problem mentioned by David 2021-05-24 16:49:17 +02:00
waldek 88f35d85e5 adds full 101-500 database 2021-05-24 16:44:18 +02:00
5 changed files with 2136 additions and 2 deletions

BIN
assets/screenshot_1.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

View File

@ -68,6 +68,8 @@ class Question(object):
"""needs quite some work"""
if not isinstance(answers, list):
raise TypeError
if len(answers) == 0:
return False
right_answers = list(self._answers) # need a copy so we don't change for future questions
for answer in answers:
try:

2129
data/lpic1_book_101-500.csv Normal file

File diff suppressed because it is too large Load Diff

View File

@ -13,3 +13,6 @@ The `./standalone_tui.py` is a basic [MVC](https://realpython.com/the-model-view
All development should be done in the `testing` branch and brought to the `master` branch with merge requests.
## Standalone TUI
![screenshot](./assets/screenshot_1.png)

View File

@ -52,7 +52,7 @@ class Tui(object):
blank
"""
answers = []
results = input("What's your answer? (only numbers, separated by a SPACE) ")
results = input("\n What's your answer? (only numbers, separated by a SPACE) ")
results = results.split()
for result in results:
if result.isdigit():
@ -115,7 +115,7 @@ class Application(object):
if __name__ == "__main__":
filepath = pathlib.Path("./data/multiple.csv")
filepath = pathlib.Path("./data/list_book1.csv")
interface = Tui()
app = Application(filepath, interface)
try: