import os def create_day_environment(): day_input = input("Enter the day (e.g., day1, day_05, monday): ").strip() if not day_input: print("Error: Day name cannot be empty.") return folder_name = day_input html_path = os.path.join(folder_name, "index.html") js_path = os.path.join(folder_name, "sandbox.js") try: os.makedirs(folder_name, exist_ok=True) print(f"Folder '{folder_name}' created successfully (or already existed).") except Exception as e: print(f"Error creating folder: {e}") return # REMOVED the 'f' prefix here to prevent CSS/JS curly braces from breaking Python html_content = """ Console Output

Live Output Feed

""" with open(html_path, "w", encoding="utf-8") as html_file: html_file.write(html_content) print(f"Created filled HTML file: {html_path}") with open(js_path, "w", encoding="utf-8") as js_file: pass print(f"Created empty JS file: {js_path}") print(f"\nSetup complete for {folder_name}!") if __name__ == "__main__": create_day_environment()