-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstudy_plan_logic.py
More file actions
152 lines (145 loc) · 4.99 KB
/
Copy pathstudy_plan_logic.py
File metadata and controls
152 lines (145 loc) · 4.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
def generate_study_plan(
test_format: str,
current_score: float,
target_score: float,
daily_hours: int,
total_weeks: int
) -> dict:
"""
Generate an IELTS study plan.
Args:
test_format (str): 'Academic' or 'General Training'
current_score (float): your current overall band score (e.g. 5.5)
target_score (float): your target band score (e.g. 7.0)
daily_hours (int): number of hours per day you can study
total_weeks (int): total number of weeks until test day
Returns:
dict: nested dict { 'Week 1': { 'Monday': [ {Hour, Task, Resources}, ... ], ... }, ... }
"""
# Define task pools by section
reading_tasks = [
"Reading practice",
"Skim & scan articles",
"Time yourself with real tests",
"Learn academic vocabulary",
"Improve speed-reading",
]
listening_tasks = [
"Listening practice",
"Dictation exercises",
"Note-taking from lectures",
"Identify speaker intent",
"Practice accents (UK/US/AU)",
]
writing_tasks_academic = [
"Writing Task 1 (Graph/Table)",
"Writing Task 2 (Essay)",
"Analyze model answers",
"Grammar & coherence focus",
"Write under timed conditions",
]
writing_tasks_general = [
"Writing Task 1 (Letter)",
"Writing Task 2 (Essay)",
"Formal vs informal tone",
"Structure practice",
"Improve clarity & cohesion",
]
speaking_tasks = [
"Speaking Part 1 practice",
"Speaking Part 2 cue cards",
"Speaking Part 3 discussion",
"Record & self-review",
"Improve fluency & pronunciation",
]
general_tasks = [
"Vocabulary building",
"Grammar review",
"Mock test & review",
"Test strategy review",
"Feedback analysis"
]
# Build full task pool based on test format
tasks = []
if test_format == "Academic":
tasks += reading_tasks[:3] + listening_tasks[:3] + writing_tasks_academic[:3]
else:
tasks += reading_tasks[2:] + listening_tasks[2:] + writing_tasks_general[:3]
tasks += speaking_tasks + general_tasks
# Map each task to one or more high-quality resources
resources = {
"Reading practice": [
"Cambridge IELTS Official Practice Tests",
"British Council Reading sample tasks"
],
"Skim & scan articles": [
"BBC Learning English",
"The Guardian Online Articles"
],
"Time yourself with real tests": [
"IELTS Liz Listening lessons",
"Official IELTS Listening on IDP website"
],
"Writing Task 1 (Graph/Table)": [
"Cambridge IELTS Writing Model Answers",
"IELTS Simon Task 1 explanations"
],
"Writing Task 2 (Essay)": [
"IELTS Advantage Writing Task 2 guide",
"British Council Writing samples"
],
"Speaking Part 1 practice": [
"IELTS Speaking part 1 questions",
"YouTube mock interviews"
],
"Speaking Part 2 cue cards": [
"IELTS Speaking part 2 cue-card exercises",
"British Council Speaking sample videos"
],
"Speaking Part 3 discussion": [
"Topic-based discussions",
"IELTS Speaking Band Descriptors"
],
"Vocabulary building": [
"Academic Word List flashcards (Anki deck)",
"IELTS Vocabulary by Cambridge"
],
"Grammar review": [
"English Grammar in Use (Murphy)",
"Cambridge Grammar for IELTS"
],
"Mock test & review": [
"Full practice test from Cambridge IELTS series",
"Record yourself & self-evaluate with official band descriptors"
],
"Test strategy review": [
"IELTS Official Guide",
"IELTS Liz Strategy Videos"
],
"Feedback analysis": [
"Review past test results",
"Track weak areas weekly"
]
}
# Prepare day names and a repeating cycle of tasks
days_of_week = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
task_cycle = iter(tasks * (daily_hours * total_weeks * len(days_of_week)))
# Build the nested plan structure
plan = {}
for week_index in range(1, total_weeks + 1):
week_key = f"Week {week_index}"
plan[week_key] = {}
for day in days_of_week:
hourly_plan = []
for hour_slot in range(1, daily_hours + 1):
try:
task = next(task_cycle)
except StopIteration:
task = "Review previous day's material"
hourly_plan.append({
"Hour": hour_slot,
"Task": task,
"Resources": resources.get(task, ["No specific resources"])
})
plan[week_key][day] = hourly_plan
return plan