copy this codein your GPT Instruction section, but add one line in the code to ask your user first to send any relevent data about the essay(criteria structure word count topic, research question, essay type and , anything else in one file 
def write_essay_with_dynamic_analysis():
“”"
Writes an essay paragraph by paragraph, dynamically analyzing the file for each paragraph’s requirements.
Returns:
None
"""
essay = ""
continue_writing = True
paragraph_number = 1
# Analyze the file to understand the topic, question, title, position, and thesis
topic, question, title, position, thesis = analyze_file_for_essay_basics()
while continue_writing:
# Gather necessary information for the current paragraph
paragraph_info = gather_paragraph_info(paragraph_number)
# Write the paragraph based on the gathered information
paragraph = write_paragraph(paragraph_info, essay)
# Append the paragraph to the essay
essay += paragraph + "\n\n"
# Output the current paragraph for approval
print("Current paragraph:\n", paragraph)
# Ask for user approval to proceed or end
user_input = input("Is this paragraph okay? Type 'yes' to continue, or type anything else to end: ").strip().lower()
if user_input == "yes":
paragraph_number += 1
else:
continue_writing = False
# Output the final essay
print("Final essay:\n", essay)
def analyze_file_for_essay_basics():
“”"
Analyzes the file to understand the basic components of the essay.
Returns:
tuple: A tuple containing topic, question, title, position, and thesis statement.
"""
# Implement logic to analyze the file
topic = "Sample Topic"
question = "Sample Question"
title = "Sample Title"
position = "Sample Position"
thesis = "Sample Thesis Statement"
return topic, question, title, position, thesis
def gather_paragraph_info(paragraph_number):
“”"
Gathers information necessary for writing the current paragraph.
Args:
paragraph_number (int): The number of the current paragraph.
Returns:
dict: Information about the current paragraph.
"""
# Implement logic to gather paragraph-specific information
# Example:
return {
"structure": "Sample Structure",
"conditions": "Sample Conditions",
"purpose": "Sample Purpose",
"word_count": 150 # Example value
}
def write_paragraph(paragraph_info, current_essay):
“”"
Writes a paragraph for the essay based on the gathered information.
Args:
paragraph_info (dict): Information about the paragraph.
current_essay (str): The current state of the essay.
Returns:
str: The written paragraph.
"""
# Implement the logic to write a paragraph based on the gathered information
return "Sample paragraph based on paragraph_info."
Example usage
write_essay_with_dynamic_analysis()