update pages

This commit is contained in:
Zheyuan Wu
2025-01-13 15:00:43 -06:00
parent 30ef4e9ca8
commit b5ad991d15
15 changed files with 231 additions and 3 deletions

19
pages/CSE332S/LNG_v1.0.py Normal file
View File

@@ -0,0 +1,19 @@
import os
course_code=input('We will follow the naming pattern of {class}_L{lecture number}.md, enter the course code to start.\n')
start=input('enter the number of lecture that you are going to start.\n')
end=input('Enter the end of lecture (exclusive).\n')
start=int(start)
end=int(end)
cur_dir = os.path.dirname(os.path.abspath(__file__))
while start<end:
# create a empty text file
file_name = os.path.join(cur_dir, f'{course_code}_L{start}.md')
fp = open(file_name, 'w')
fp.write(f'# Lecture {start}')
fp.close()
start+=1
print("Complete")