V1 untested

This commit is contained in:
2026-04-30 15:21:38 -04:00
parent c31cb1c699
commit a98042ca5b
7 changed files with 223 additions and 18 deletions

19
main.py
View File

@@ -7,7 +7,7 @@ from sympy import init_printing
#define the entry point to the programs
def main():
init_printing(order='none')
init_printing(order='lex')
problem = generate_problem()
steps = generate_steps(problem);
@@ -15,7 +15,22 @@ def main():
print(problem)
print("Steps:")
print(steps)
pretty_print_steps(steps)
def pretty_print_steps(steps):
print("\n" + "=" * 50)
for i, step in enumerate(steps, start=1):
print(f"\nStep {i}")
print("-" * 50)
print(f"Before: {step.get('before', '')}")
print(f"After: {step.get('after', '')}")
for key in step:
if key not in ("before", "after"):
print(f"{key.capitalize()}: {step[key]}")
print("\n" + "=" * 50)
#Starts the program
if __name__ == "__main__":