add new python example; add simple typing annotations

This commit is contained in:
Laurent Perron
2024-07-23 14:07:41 +02:00
parent 08e9085d36
commit 905770c995
24 changed files with 111 additions and 27 deletions

View File

@@ -115,7 +115,7 @@ def read_model(filename):
return model
def print_stats(model):
def print_stats(model) -> None:
print("Model Statistics")
for key, value in model.items():
print(f" - {key}: {value}")
@@ -183,7 +183,7 @@ def solve_model_greedily(model):
return assignment
def solve_boolean_model(model, hint):
def solve_boolean_model(model, hint) -> None:
"""solve the given model."""
print("Solving using the Boolean model")