mirror of
https://github.com/DeaDvey/mathgenerator.git
synced 2025-11-28 14:35:23 +01:00
17 lines
562 B
Python
17 lines
562 B
Python
import os
|
|
|
|
print("You are about to add a new generator to the table in futureGenerators.md")
|
|
print("Please fill out the following:")
|
|
title = input("> Title: ")
|
|
example_problem = input("> Example Problem: ")
|
|
example_solution = input("> Example Solution: ")
|
|
further_explanation = input("> Further explanation (optional): ")
|
|
|
|
if os.getcwd()[-7:] == 'scripts':
|
|
file = '../futureGenerators.md'
|
|
else:
|
|
file = './futureGenerators.md'
|
|
|
|
with open(file, 'a') as f:
|
|
f.writelines(f'| {title} | {example_problem} | {example_solution} | {further_explanation} |\n')
|