YEON PLANNING · 직관수학 (초4)

꺾은선그래프 — 4단계 문제은행

영상으로 배우고 → 직접 풀고 → 답 제출 → 해설. 점을 이으면 흐름이 보여요 — 기울기가 곧 변화의 크기.

✍️ 연플래닝 오리지널 — 「아하! 보이는 직관수학」 자체 제작. 모든 문제·정답 손검산 완료. 답안을 제출해야 해설·정답이 열립니다(먼저 스스로 풀어 보세요).

💬 더 필요한 게 있나요?

난이도 조절(더 쉽게 / 더 어렵게) · 다른 유형 · 특정 개념 집중 · 문항 수 등 무엇이든 적어 주세요. 선생님이 확인합니다. (공개 아님)
✏️ 손으로 풀어보세요
`; return s; } // ── 꺾은선그래프 (값은 실제 눈금에 맞춰 찍는다) ── function lgraph(cfg){ const {labels=[], vals=[], step=1, unit='°C', note='', W=310, H=250, base=0} = cfg; const L=46, B=52, T=22, R=16, PW=W-L-R, PH=H-B-T; const mx=Math.max(...vals), mn=Math.min(base, Math.min(...vals)); const lo=Math.floor(mn/step)*step, hi=Math.ceil(mx/step)*step + step; const yy=v=>T+PH-((v-lo)/(hi-lo))*PH, xx=i=>L+(PW/(vals.length-1))*i; let s=``; for(let v=lo; v<=hi; v+=step){ const y=yy(v); s+=``; s+=`${v}`; } vals.forEach((v,i)=>{ s+=``; s+=`${labels[i]}`; }); s+=``; vals.forEach((v,i)=>{ s+=``; }); s+=``; s+=``; s+=`(${unit})`; if(note) s+=`${note}`; s+=``; return s; } const P=[ { tier:'기초', type:'self', kind:'num', q:'꺾은선그래프에서 1월 기온은 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'월별 기온'}), answer:4, hint:'점이 찍힌 곳에서 왼쪽 눈금으로 곧게 따라가 보세요.', sol:{ ans:'4°C', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월 = 4°C'}), steps:['1월 자리에서 위로 올라가 점을 찾아요.','그 점에서 왼쪽으로 가면 4°C.','꺾은선그래프는 점의 높이가 값이에요!']}}, { tier:'기초', type:'self', kind:'num', q:'꺾은선그래프에서 2월 기온은 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'월별 기온'}), answer:8, hint:'점이 찍힌 곳에서 왼쪽 눈금으로 곧게 따라가 보세요.', sol:{ ans:'8°C', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'2월 = 8°C'}), steps:['2월 자리에서 위로 올라가 점을 찾아요.','그 점에서 왼쪽으로 가면 8°C.','꺾은선그래프는 점의 높이가 값이에요!']}}, { tier:'기초', type:'self', kind:'num', q:'꺾은선그래프에서 3월 기온은 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'월별 기온'}), answer:14, hint:'점이 찍힌 곳에서 왼쪽 눈금으로 곧게 따라가 보세요.', sol:{ ans:'14°C', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'3월 = 14°C'}), steps:['3월 자리에서 위로 올라가 점을 찾아요.','그 점에서 왼쪽으로 가면 14°C.','꺾은선그래프는 점의 높이가 값이에요!']}}, { tier:'기초', type:'self', kind:'num', q:'꺾은선그래프에서 4월 기온은 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'월별 기온'}), answer:18, hint:'점이 찍힌 곳에서 왼쪽 눈금으로 곧게 따라가 보세요.', sol:{ ans:'18°C', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'4월 = 18°C'}), steps:['4월 자리에서 위로 올라가 점을 찾아요.','그 점에서 왼쪽으로 가면 18°C.','꺾은선그래프는 점의 높이가 값이에요!']}}, { tier:'기초', type:'self', kind:'num', q:'꺾은선그래프에서 5월 기온은 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'월별 기온'}), answer:22, hint:'점이 찍힌 곳에서 왼쪽 눈금으로 곧게 따라가 보세요.', sol:{ ans:'22°C', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'5월 = 22°C'}), steps:['5월 자리에서 위로 올라가 점을 찾아요.','그 점에서 왼쪽으로 가면 22°C.','꺾은선그래프는 점의 높이가 값이에요!']}}, { tier:'기초', type:'self', kind:'choice', q:'기온이 가장 높은 달은 언제일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'가장 높은 달은?'}), choices:['2월','3월','4월','5월'], answer:'5월', hint:'점이 가장 높은 곳을 찾으세요!', sol:{ ans:'5월 (22°C)', fig:null, steps:['점이 가장 높은 달을 찾아요.','5월이 22°C로 가장 높아요.','5월이에요!']}}, { tier:'기초', type:'self', kind:'choice', q:'기온이 가장 낮은 달은 언제일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'가장 낮은 달은?'}), choices:['1월','2월','3월','5월'], answer:'1월', hint:'점이 가장 낮은 곳!', sol:{ ans:'1월 (4°C)', fig:null, steps:['점이 가장 낮은 달을 찾아요.','1월이 4°C로 가장 낮아요.','1월이에요!']}}, { tier:'기초', type:'self', kind:'num', q:'이 그래프에서 눈금 한 칸은 몇 °C 를 나타낼까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'세로축 눈금 한 칸은?'}), answer:4, hint:'세로축 숫자가 0, 4, 8, 12… 로 올라가요.', sol:{ ans:'4°C', fig:null, steps:['세로축 숫자: 0, 4, 8, 12, 16…','한 칸에 4씩 늘어요.','눈금 한 칸부터 확인 — 그래프 읽기의 첫걸음!']}}, { tier:'기초', type:'self', kind:'choice', q:'1월부터 5월까지 기온은 어떻게 변했을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'선이 올라가나요, 내려가나요?'}), choices:['계속 올랐다','계속 내렸다','올랐다 내렸다','변화 없다'], answer:'계속 올랐다', hint:'선이 올라가나요, 내려가나요?', sol:{ ans:'계속 올랐다', fig:null, steps:['선이 왼쪽에서 오른쪽으로 계속 위로 향해요.','4 → 8 → 14 → 18 → 22 — 계속 커져요.','꺾은선그래프는 변화의 방향을 한눈에 보여줘요!']}}, { tier:'기초', type:'self', kind:'choice', q:'꺾은선그래프에서 이 나타내는 것은 무엇일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'점 하나가 뜻하는 것은?'}), choices:['그 달의 기온','달의 개수','기온의 합','알 수 없다'], answer:'그 달의 기온', hint:'점이 찍힌 높이가 무엇을 뜻하나요?', sol:{ ans:'그 달의 기온', fig:null, steps:['가로축은 , 세로축은 기온.','점은 「이 달에 기온이 이만큼이었다」를 나타내요.','점의 높이가 곧 값이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'1월에서 2월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월 → 2월은 몇 도 올랐나요?'}), answer:4, hint:'나중 값 − 처음 값!', sol:{ ans:'4°C', fig:null, steps:['1월 = 4°C, 2월 = 8°C.','8 − 4 = 4°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'2월에서 3월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'2월 → 3월은 몇 도 올랐나요?'}), answer:6, hint:'나중 값 − 처음 값!', sol:{ ans:'6°C', fig:null, steps:['2월 = 8°C, 3월 = 14°C.','14 − 8 = 6°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'3월에서 4월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'3월 → 4월은 몇 도 올랐나요?'}), answer:4, hint:'나중 값 − 처음 값!', sol:{ ans:'4°C', fig:null, steps:['3월 = 14°C, 4월 = 18°C.','18 − 14 = 4°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'4월에서 5월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'4월 → 5월은 몇 도 올랐나요?'}), answer:4, hint:'나중 값 − 처음 값!', sol:{ ans:'4°C', fig:null, steps:['4월 = 18°C, 5월 = 22°C.','22 − 18 = 4°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'1월에서 3월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월 → 3월은 몇 도 올랐나요?'}), answer:10, hint:'나중 값 − 처음 값!', sol:{ ans:'10°C', fig:null, steps:['1월 = 4°C, 3월 = 14°C.','14 − 4 = 10°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'2월에서 4월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'2월 → 4월은 몇 도 올랐나요?'}), answer:10, hint:'나중 값 − 처음 값!', sol:{ ans:'10°C', fig:null, steps:['2월 = 8°C, 4월 = 18°C.','18 − 8 = 10°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'3월에서 5월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'3월 → 5월은 몇 도 올랐나요?'}), answer:8, hint:'나중 값 − 처음 값!', sol:{ ans:'8°C', fig:null, steps:['3월 = 14°C, 5월 = 22°C.','22 − 14 = 8°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'1월에서 5월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월 → 5월은 몇 도 올랐나요?'}), answer:18, hint:'나중 값 − 처음 값!', sol:{ ans:'18°C', fig:null, steps:['1월 = 4°C, 5월 = 22°C.','22 − 4 = 18°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'2월에서 5월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'2월 → 5월은 몇 도 올랐나요?'}), answer:14, hint:'나중 값 − 처음 값!', sol:{ ans:'14°C', fig:null, steps:['2월 = 8°C, 5월 = 22°C.','22 − 8 = 14°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'중급', type:'self', kind:'num', q:'1월에서 4월까지 기온은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월 → 4월은 몇 도 올랐나요?'}), answer:14, hint:'나중 값 − 처음 값!', sol:{ ans:'14°C', fig:null, steps:['1월 = 4°C, 4월 = 18°C.','18 − 4 = 14°C 올랐어요.','오른 양 = 나중 − 처음. 선이 위로 간 만큼이에요!']}}, { tier:'상위', type:'self', kind:'num', q:'이웃한 달끼리 비교할 때 기온이 가장 많이 오른 구간은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'선이 가장 가파른 구간은?'}), answer:6, hint:'이웃한 달끼리 차를 모두 구해 보세요: 4→8, 8→14, 14→18, 18→22', sol:{ ans:'6°C (2월→3월)', fig:null, steps:['구간별 오른 양: 1→2월 4°C, 2→3월 6°C, 3→4월 4°C, 4→5월 4°C.','가장 많이 오른 구간 = 2월→3월의 6°C.','선이 가장 가파른 곳이 가장 많이 변한 곳이에요!']}}, { tier:'상위', type:'self', kind:'num', q:'기온이 가장 적게 오른 구간은 몇 °C 올랐을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'선이 가장 완만한 구간은?'}), answer:4, hint:'구간별 오른 양을 모두 구해 비교하세요: 4→8, 8→14, 14→18, 18→22', sol:{ ans:'4°C', fig:null, steps:['구간별: 1→2월 4°C, 2→3월 6°C, 3→4월 4°C, 4→5월 4°C.','가장 적게 오른 양 = 4°C (세 구간이 똑같이 4°C).','선이 가장 완만한 곳이 가장 적게 변한 곳이에요!']}}, { tier:'상위', type:'self', kind:'choice', q:'꺾은선그래프에서 선이 가파를수록 무엇을 뜻할까요?', fig:null, choices:['변화가 크다','변화가 작다','값이 줄었다','값이 그대로다'], answer:'변화가 크다', hint:'선의 기울기가 무엇을 말하는지 생각해 보세요.', sol:{ ans:'변화가 크다', fig:null, steps:['선의 기울기 = 변화의 빠르기.','가파를수록 짧은 시간에 많이 변한 거예요.','그래서 변화가 크다!']}}, { tier:'상위', type:'self', kind:'choice', q:'꺾은선그래프에서 선이 평평할수록 무엇을 뜻할까요?', fig:null, choices:['변화가 크다','변화가 작다','값이 줄었다','값이 그대로다'], answer:'변화가 작다', hint:'선의 기울기가 무엇을 말하는지 생각해 보세요.', sol:{ ans:'변화가 작다', fig:null, steps:['평평한 선 = 값이 거의 안 변함.','기울기가 작으면 변화도 작아요.','그래서 변화가 작다!']}}, { tier:'상위', type:'self', kind:'choice', q:'꺾은선그래프에서 선이 아래로 향하면 무엇을 뜻할까요?', fig:null, choices:['변화가 크다','변화가 작다','값이 줄었다','값이 그대로다'], answer:'값이 줄었다', hint:'선의 기울기가 무엇을 말하는지 생각해 보세요.', sol:{ ans:'값이 줄었다', fig:null, steps:['선이 내려가면 나중 값이 처음 값보다 작아요.','그래서 값이 줄었다.','올라가면 늘고, 내려가면 줄어요 — 방향이 곧 이야기예요!']}}, { tier:'상위', type:'self', kind:'choice', q:'꺾은선그래프에서 선이 수평이면 무엇을 뜻할까요?', fig:null, choices:['변화가 크다','변화가 작다','값이 줄었다','값이 그대로다'], answer:'값이 그대로다', hint:'선의 기울기가 무엇을 말하는지 생각해 보세요.', sol:{ ans:'값이 그대로다', fig:null, steps:['수평 = 높이가 안 변함.','높이가 값이니 값도 그대로.','변화 없음을 뜻해요!']}}, { tier:'상위', type:'self', kind:'choice', q:'막대그래프와 꺾은선그래프 중 변화의 흐름을 보기 좋은 것은?', fig:null, choices:['막대그래프','꺾은선그래프','둘 다 같다','알 수 없다'], answer:'꺾은선그래프', hint:'시간에 따라 어떻게 변했는지 — 어느 쪽이 잘 보일까요?', sol:{ ans:'꺾은선그래프', fig:null, steps:['막대그래프는 많고 적음 비교에 좋아요.','꺾은선그래프는 점을 선으로 이어 흐름이 보여요.','시간에 따른 변화 = 꺾은선그래프!']}}, { tier:'상위', type:'self', kind:'choice', q:'6월 기온을 예상한다면 22°C 보다 높을까요, 낮을까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'이 흐름이 이어진다면 6월은?'}), choices:['높다','낮다','같다','알 수 없다'], answer:'높다', hint:'1월부터 계속 오르고 있어요. 흐름이 이어진다면?', sol:{ ans:'높다 (계속 오르는 흐름)', fig:null, steps:['1월부터 5월까지 기온이 계속 올랐어요.','이 흐름이 이어진다면 6월도 더 오를 거예요.','꺾은선그래프의 힘 = 앞으로를 짐작할 수 있다는 것! (확실한 건 아니에요)']}}, { tier:'상위', type:'self', kind:'num', q:'1월과 5월 기온의 차는 몇 °C 일까요?', fig:lgraph({labels:['1월','2월','3월','4월','5월'], vals:[4,8,14,18,22], step:4, unit:'°C', note:'1월과 5월의 차는?'}), answer:18, hint:'22 − 4 = ?', sol:{ ans:'18°C', fig:null, steps:['1월 = 4°C, 5월 = 22°C.','22 − 4 = 18°C.','가장 높은 점과 가장 낮은 점의 높이 차이예요!']}}, { tier:'상위', type:'self', kind:'num', q:'기온이 10°C 를 넘은 달은 몇 개일까요?', fig:null, answer:3, hint:'10보다 큰 값을 세세요: 4, 8, 14, 18, 22', sol:{ ans:'3개 (3·4·5월)', fig:null, steps:['10보다 큰 값: 14(3월), 18(4월), 22(5월).','4(1월)·8(2월)은 10보다 작아요.','그래서 3개예요!']}}, { tier:'최상위', type:'self', kind:'num', q:'5개월 기온의 평균은 몇 °C 일까요?', fig:null, answer:13.2, hint:'합 66을 5로 나누세요.', sol:{ ans:'13.2', fig:null, steps:['합 = 4 + 8 + 14 + 18 + 22 = 66°C.','66 ÷ 5 = 13.2°C.','평균 = 합 ÷ 개수!']}}, { tier:'최상위', type:'self', kind:'num', q:'눈금 한 칸이 2°C 로 바뀌면 5월 점의 칸 수는?', fig:null, answer:11, hint:'22를 한 칸 2로 세면?', sol:{ ans:'11', fig:null, steps:['5월 = 22°C.','22 ÷ 2 = 11칸.','눈금이 작아지면 칸 수가 늘어요 — 값은 그대로!']}}, { tier:'최상위', type:'self', kind:'choice', q:'눈금 한 칸이 2°C 가 되면 그래프의 선은 어떻게 보일까요?', fig:null, choices:['더 가파르게 보인다','더 평평해 보인다','똑같다','알 수 없다'], answer:'더 가파르게 보인다', hint:'같은 22°C인데 칸이 11칸으로 늘면 그림은?', sol:{ ans:'더 가파르게 보인다', fig:null, steps:['눈금이 작아지면 같은 값도 칸을 많이 차지해요.','선이 위로 더 많이 뻗어 가팔라 보여요.','⚠️ 값은 똑같은데 눈금을 바꾸면 인상이 달라져요 — 그래프를 볼 땐 눈금부터 봐야 하는 이유!']}}, { tier:'최상위', type:'self', kind:'choice', q:'2월에서 3월 사이 어느 날의 기온을 이 그래프로 정확히 알 수 있을까요?', fig:null, choices:['없다','있다','2월 값으로 안다','3월 값으로 안다'], answer:'없다', hint:'그래프에 점이 찍힌 건 매달 한 번뿐이에요. 그 사이 선은 무엇일까요?', sol:{ ans:'없다', fig:null, steps:['점이 찍힌 건 각 달의 기온뿐이에요.','점과 점 사이의 선은 「이렇게 변했을 것 같다」는 짐작.','그 사이 실제 기온은 오르내렸을 수 있어요 → 정확히는 알 수 없어요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'기온처럼 이어서 변하는 것을 나타내기 좋은 그래프는?', fig:null, choices:['막대그래프','꺾은선그래프','둘 다 같다','알 수 없다'], answer:'꺾은선그래프', hint:'기온은 순간마다 조금씩 변하죠. 막대로 뚝뚝 끊는 게 맞을까요?', sol:{ ans:'꺾은선그래프', fig:null, steps:['기온은 시간에 따라 이어서 변해요.','점을 선으로 이으면 그 흐름이 보여요.','그래서 꺾은선그래프가 알맞아요! (좋아하는 과일 수 같은 건 막대그래프가 알맞고요)']}}, { tier:'최상위', type:'self', kind:'num', q:'3월과 4월 기온의 한가운데쯤 되는 값은 몇 °C 일까요?', fig:null, answer:16, hint:'14와 18의 한가운데는? 둘을 더해 2로 나눠 보세요.', sol:{ ans:'16°C', fig:null, steps:['3월 = 14°C, 4월 = 18°C.','(14 + 18) ÷ 2 = 16°C.','두 점을 이은 선의 한가운데 높이가 16°C예요!']}}, { tier:'최상위', type:'self', kind:'num', q:'1월 기온이 4°C 이고 매달 6°C 씩 올랐다면 5월은 몇 °C 였을까요?', fig:null, answer:28, hint:'4에서 6씩 네 번 오르면? (1→2, 2→3, 3→4, 4→5월 = 네 번)', sol:{ ans:'28°C', fig:null, steps:['1월에서 5월까지는 네 번 오르는 거예요 (1→2, 2→3, 3→4, 4→5).','6 × 4 = 24. 4 + 24 = 28°C.','실제 그래프의 5월은 22°C — 실제로는 매달 6°C씩 오르지 않았다는 뜻이에요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'기온을 0°C 부터 그리지 않고 4°C 부터 그리면 어떻게 보일까요?', fig:null, choices:['차이가 더 커 보인다','차이가 작아 보인다','똑같다','알 수 없다'], answer:'차이가 더 커 보인다', hint:'아래를 잘라내면 막대·선의 차이가 어떻게 보일까요?', sol:{ ans:'차이가 더 커 보인다', fig:null, steps:['세로축 아래쪽을 잘라내면 남은 부분이 확대돼 보여요.','같은 값인데 차이가 더 크게 느껴져요.','⚠️ 그래서 그래프를 볼 땐 세로축이 0에서 시작하는지 꼭 확인해야 해요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'좋아하는 과일 종류별 학생 수는 어떤 그래프가 알맞을까요?', fig:null, choices:['막대그래프','꺾은선그래프','둘 다 같다','알 수 없다'], answer:'막대그래프', hint:'과일 종류는 시간처럼 이어지지 않아요. 사과와 배 사이에 뭔가 있나요?', sol:{ ans:'막대그래프', fig:null, steps:['과일 종류는 시간처럼 이어지지 않아요.','사과와 배 사이를 선으로 이으면 뜻이 없어요.','종류별 많고 적음 비교 → 막대그래프가 알맞아요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'꺾은선그래프의 점과 점 사이를 선으로 잇는 이유는 무엇일까요?', fig:null, choices:['변화의 흐름을 보려고','값을 정확히 재려고','보기 예쁘라고','알 수 없다'], answer:'변화의 흐름을 보려고', hint:'점만 찍어 두면 무엇이 안 보일까요?', sol:{ ans:'변화의 흐름을 보려고', fig:null, steps:['점만 있으면 각 달의 값만 보여요.','선으로 이으면 어떻게 변해 왔는지가 한눈에 보여요.','선은 실제 측정값이 아니라 흐름을 보여주는 안내선이에요!']}}, ]; const TIERS=['기초','중급','상위','최상위']; const TIER_DESC={기초:'영상만 봐도 바로 풀려요 — 배운 걸 그대로 적용.',중급:'한 번 더 생각 — 거꾸로·변형. 영상 안에 답이 있어요.',상위:'아래 학년 개념(선수 단원)을 함께 써야 풀려요.',최상위:'여러 개념·역발상·함정까지. 최고 난도.'}; let curTier='기초'; function tierProblems(t){ return P.map((p,i)=>({p,i})).filter(o=>o.p.tier===t); } function renderTabs(){ const tb=document.getElementById('tabs'); tb.innerHTML=''; TIERS.forEach(t=>{ const n=tierProblems(t).length; const b=document.createElement('button'); b.className='tab'+(t===curTier?' on':''); b.textContent=`${t} (${n})`; b.onclick=()=>{curTier=t; renderTabs(); renderList();}; tb.appendChild(b); }); document.getElementById('tierNote').textContent=TIER_DESC[curTier]; } function esc(x){return String(x).replace(/&/g,'&').replace(//g,'>');} function renderList(){ const L=document.getElementById('list'); L.innerHTML=''; const items=tierProblems(curTier); if(!items.length){ L.innerHTML='
이 난도는 곧 채워집니다 — 파일럿은 기초·중급·상위 예시.
'; return; } items.forEach(({p,i},k)=>{ const badge = p.type==='video' ? '🎬 영상해설' : '✍ 텍스트해설'; const pre = p.prereq ? `🔗 ${p.prereq.name}` : ''; const c=document.createElement('div'); c.className='card'; c.id='card'+i; let ansUI = p.kind==='choice' ? `
`+p.choices.map(o=>``).join('')+`
` : `
← 내 답을 쓰고 제출
`; c.innerHTML=`
${curTier} · 문제 ${k+1} ${badge} ${pre}
${mfx(p.q)}
${p.fig?`
${p.fig}
`:''} ${ansUI}
🔒 답을 제출해야 해설·정답이 열려요.
💡 힌트 — ${p.hint}
`; L.appendChild(c); }); } const picked={}; // 분수 답 입력 지원: '3/4', '1 1/2', '0.75' 모두 인식 function parseAns(v){ v=String(v).trim().replace(/\s+/g,' '); let m=/^(-?\d+)\s+(\d+)\/(\d+)$/.exec(v); if(m){ const s=(+m[1])<0?-1:1; return s*(Math.abs(+m[1])+(+m[2])/(+m[3])); } m=/^(-?\d+)\/(-?\d+)$/.exec(v); if(m) return (+m[1])/(+m[2]); return parseFloat(v.replace(/[^0-9.\-]/g,'')); } function pick(i,val,el){ picked[i]=val; document.querySelectorAll('#ch'+i+' button').forEach(b=>b.classList.remove('sel')); el.classList.add('sel'); } function mfx(t){ if(!window.mathToHTML) return t; // HTML 태그( 등)는 그대로 두고, 태그 사이 텍스트만 교과서식 수식으로 변환 return String(t).split(/(<[^>]+>)/).map(s=> s.charAt(0)==='<' ? s : mathToHTML(s)).join(''); } function submit(i){ const p=P[i]; let mine; if(p.kind==='choice'){ mine=picked[i]; if(mine==null){ alert('보기 중 하나를 먼저 고르세요.'); return; } } else { const v=document.getElementById('in'+i).value.trim(); if(v===''){ alert('답을 먼저 입력하세요.'); return; } mine=parseAns(v); if(isNaN(mine)){ alert('숫자나 분수(예: 3/4)로 입력해 주세요.'); return; } } const correct = p.kind==='choice' ? (mine===p.answer) : (Math.abs(mine-p.answer)<1e-6); const vd=document.getElementById('vd'+i); vd.classList.remove('hide'); document.getElementById('lock'+i).classList.add('hide'); document.getElementById('show'+i).classList.remove('hide'); // 제출했으니 해설 열람 가능 if(correct){ vd.className='verdict ok'; vd.innerHTML='✅ 정답이에요! 잘했어요.'; reveal(i); } else{ vd.className='verdict no'; vd.innerHTML='❌ 아쉬워요. 힌트를 보고 다시 풀어 볼까요? (해설도 열렸어요)'; document.getElementById('hint'+i).classList.remove('hide'); } } function reveal(i){ const p=P[i], sol=document.getElementById('sol'+i); sol.classList.remove('hide'); let steps=p.sol.steps.map(s=>`
• ${mfx(s)}
`).join(''); let pre=p.prereq?`
🔗 이 문제는 ${p.prereq.name} 개념이 필요해요 — 그 단원 보러 가기 →
`:''; let vsol = p.type==='video' ? `🎬 이 문제 영상 해설 보기 (짧게)` : ''; sol.innerHTML=`

📝 해설

${pre}${p.sol.fig?`
${p.sol.fig}
`:''}${steps}
정답: ${mfx(p.sol.ans)}
${vsol}` +`
🙋 이 해설이 어렵거나 더 자세히 알고 싶으면 말씀해주세요 — 상세 해설지를 새로 만들어 보내드릴게요.
` +``; } /* ───────── "이 해설도 어려워요" 체크 → 하단 요청 코너로 모으기 ───────── */ const hardSet=new Set(); function toggleHard(i,on){ on?hardSet.add(i):hardSet.delete(i); syncHard(); } function syncHard(){ const box=document.getElementById('hardList'); if(!box) return; if(!hardSet.size){ box.style.display='none'; box.textContent=''; return; } const names=[...hardSet].sort((a,b)=>a-b).map(i=>{ const list=tierProblems(P[i].tier); const k=list.findIndex(o=>o.i===i); return `${P[i].tier} ${k+1}번`; }); box.style.display='block'; box.innerHTML='🙋 해설이 어렵다고 표시한 문제: '+names.join(', ')+' — 보내기를 누르면 함께 전달돼요.'; } /* ───────── 추가요청 보내기 (선생님 확인용 · 이 기기에 저장) ───────── */ function reqKey(){ return 'pbreq:'+location.pathname; } function loadReq(){ try{ return JSON.parse(localStorage.getItem(reqKey())||'[]'); }catch(e){ return []; } } function nowStr(){ const d=new Date(), p=n=>(n<10?'0':'')+n; return d.getFullYear()+'-'+p(d.getMonth()+1)+'-'+p(d.getDate())+' '+p(d.getHours())+':'+p(d.getMinutes()); } function sendReq(){ const ta=document.getElementById('reqText'), note=document.getElementById('reqNote'); const text=(ta.value||'').trim(); const hard=[...hardSet].sort((a,b)=>a-b).map(i=>{ const list=tierProblems(P[i].tier); const k=list.findIndex(o=>o.i===i); return `${P[i].tier} ${k+1}번`; }); if(!text && !hard.length){ note.style.color='#C0503D'; note.textContent='요청 내용을 적거나, 어려운 해설을 체크해 주세요.'; return; } const arr=loadReq(); arr.push({ date:nowStr(), text, hard, unit:'초4 꺾은선그래프' }); try{ localStorage.setItem(reqKey(), JSON.stringify(arr)); }catch(e){} ta.value=''; hardSet.clear(); syncHard(); document.querySelectorAll('.retag input').forEach(c=>c.checked=false); note.style.color='#2c8a55'; note.textContent='✅ 보냈어요! 선생님이 확인합니다. (이 기기에 저장됨)'; renderReq(); } function renderReq(){ const box=document.getElementById('reqMine'); if(!box) return; const arr=loadReq(); box.innerHTML=''; if(!arr.length) return; box.innerHTML='
📒 내가 보낸 요청 ('+arr.length+')
' + arr.slice().reverse().map(it=>`
${it.hard&&it.hard.length?'🙋 어려운 해설: '+it.hard.join(', ')+'
':''}${(it.text||'').replace(/(내용 없음)'}
${it.date}
`).join(''); } /* ───────── 인쇄 2모드 — 절약 인쇄(2단·컬러 유지) ───────── */ function ecoPrint(){ document.body.classList.add('eco-print'); window.addEventListener('afterprint', function h(){ document.body.classList.remove('eco-print'); window.removeEventListener('afterprint',h); }); window.print(); } /* ───────── DrawBoard (문항별 손으로 풀기 — 화면 가득 전체화면) ───────── */ const canvas=document.getElementById('drawCanvas'), ctx=canvas.getContext('2d'); const drawOverlay=document.getElementById('drawOverlay'), drawWrap=document.getElementById('drawCanvasWrap'); let drawOn=false, tool='pen', dsize=6, dcolor='#1f2a2a', drawing=false, last=null, currentDrawQ=null; const drawings={}; // i -> dataURL (문항별 손풀이) const photos={}; // i -> dataURL (문항별 사진) function sizeCanvas(restore){ const rect=drawWrap.getBoundingClientRect(), dpr=window.devicePixelRatio||1; canvas.width=Math.round(rect.width*dpr); canvas.height=Math.round(rect.height*dpr); canvas.style.width=rect.width+'px'; canvas.style.height=rect.height+'px'; ctx.setTransform(dpr,0,0,dpr,0,0); ctx.clearRect(0,0,rect.width,rect.height); if(restore){ const img=new Image(); img.onload=()=>ctx.drawImage(img,0,0,rect.width,rect.height); img.src=restore; } } window.addEventListener('resize',()=>{ if(drawOn) sizeCanvas(drawings[currentDrawQ]); }); window.openDraw=function(i){ drawOn=true; currentDrawQ=i; const plain=String(P[i].q).replace(/<[^>]*>/g,''); document.getElementById('drawQref').textContent=P[i].tier+' · '+plain.slice(0,30)+'…'; drawOverlay.classList.add('on'); sizeCanvas(drawings[i]); const el2=document.documentElement, req=el2.requestFullscreen||el2.webkitRequestFullscreen||el2.msRequestFullscreen; if(req){ try{ req.call(el2).catch(()=>{}); }catch(e){} } }; window.closeDraw=function(){ if(currentDrawQ!=null){ const hasInk=(()=>{ const d=ctx.getImageData(0,0,canvas.width,canvas.height).data; for(let k=3;k0) return true; return false; })(); if(hasInk){ drawings[currentDrawQ]=canvas.toDataURL('image/png'); renderThumbs(currentDrawQ); } } drawOn=false; currentDrawQ=null; drawOverlay.classList.remove('on'); if(document.fullscreenElement||document.webkitFullscreenElement){ (document.exitFullscreen||document.webkitExitFullscreen).call(document).catch(()=>{}); } }; window.submitFromDraw=function(){ const i=currentDrawQ; closeDraw(); if(i!=null) submit(i); }; document.addEventListener('fullscreenchange',()=>{ if(!document.fullscreenElement && drawOn) closeDraw(); }); window.setTool=t=>{ tool=t; document.getElementById('toolPen').classList.toggle('on',t==='pen'); document.getElementById('toolErase').classList.toggle('on',t==='erase'); }; window.setSize=s=>{ dsize=s; ['szS','szM','szL'].forEach(id=>document.getElementById(id).classList.remove('on')); document.getElementById(s===3?'szS':s===12?'szL':'szM').classList.add('on'); }; window.setColor=c=>{ dcolor=c; }; window.clearDraw=()=>{ if(confirm('그린 것을 모두 지울까요?')) ctx.clearRect(0,0,canvas.width,canvas.height); }; function dpos(e){ const r=canvas.getBoundingClientRect(), t=e.touches?e.touches[0]:e; return [t.clientX-r.left, t.clientY-r.top]; } function dstart(e){ if(!drawOn) return; e.preventDefault(); drawing=true; last=dpos(e); } function dmove(e){ if(!drawOn||!drawing) return; e.preventDefault(); const p=dpos(e); ctx.lineCap='round'; ctx.lineJoin='round'; if(tool==='erase'){ ctx.globalCompositeOperation='destination-out'; ctx.lineWidth=dsize*4; } else{ ctx.globalCompositeOperation='source-over'; ctx.strokeStyle=dcolor; ctx.lineWidth=dsize; } ctx.beginPath(); ctx.moveTo(last[0],last[1]); ctx.lineTo(p[0],p[1]); ctx.stroke(); last=p; } function dend(){ drawing=false; } canvas.addEventListener('mousedown',dstart); canvas.addEventListener('mousemove',dmove); window.addEventListener('mouseup',dend); canvas.addEventListener('touchstart',dstart,{passive:false}); canvas.addEventListener('touchmove',dmove,{passive:false}); canvas.addEventListener('touchend',dend,{passive:false}); /* ───────── 사진으로 올리기 (문항별) ───────── */ window.onPhoto=function(i,inputEl){ const file=inputEl.files&&inputEl.files[0]; if(!file) return; const reader=new FileReader(); reader.onload=ev=>{ const img=new Image(); img.onload=()=>{ const maxW=900, sc=Math.min(1,maxW/img.width), w=Math.round(img.width*sc), h=Math.round(img.height*sc); const cv=document.createElement('canvas'); cv.width=w; cv.height=h; cv.getContext('2d').drawImage(img,0,0,w,h); photos[i]=cv.toDataURL('image/jpeg',0.6); renderThumbs(i); }; img.src=ev.target.result; }; reader.readAsDataURL(file); inputEl.value=''; }; window.removePhoto=function(i){ delete photos[i]; renderThumbs(i); }; window.removeDrawing=function(i){ delete drawings[i]; renderThumbs(i); }; function renderThumbs(i){ const box=document.getElementById('thumbs'+i); if(!box) return; let h=''; if(drawings[i]) h+=`
손풀이
`; if(photos[i]) h+=`
사진
`; box.innerHTML=h; const db=document.getElementById('drawBtn'+i), pb=document.getElementById('photoBtn'+i); if(db) db.classList.toggle('has', !!drawings[i]); if(pb) pb.classList.toggle('has', !!photos[i]); } // 탭을 바꿔 다시 그려도 그 문항의 손풀이·사진 썸네일이 되살아나게 const _renderList=renderList; renderList=function(){ _renderList(); tierProblems(curTier).forEach(({p,i})=>renderThumbs(i)); }; renderTabs(); renderList(); renderReq();