YEON PLANNING · 직관수학 (초3)

분수 — 4단계 문제은행

영상으로 배우고 → 직접 풀고 → 답 제출 → 해설. 전체를 똑같이 나눈 것 중 몇 개 — 피자 조각으로 보기.

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

💬 더 필요한 게 있나요?

난이도 조절(더 쉽게 / 더 어렵게) · 다른 유형 · 특정 개념 집중 · 문항 수 등 무엇이든 적어 주세요. 선생님이 확인합니다. (공개 아님)
✏️ 손으로 풀어보세요
`; return s; } // ── 피자(원) 분수 모형 ── function pie(cfg){ const {parts=4, shade=1, W=200, H=210, note='', label=''} = cfg; const cx=W/2, cy=98, R=76; let s=``; for(let k=0;k180?1:0; const d=`M ${cx} ${cy} L ${x0.toFixed(1)} ${y0.toFixed(1)} A ${R} ${R} 0 ${big} 1 ${x1.toFixed(1)} ${y1.toFixed(1)} Z`; s+=``; } s+=``; if(label){ const m=/^(\d+)\/(\d+)$/.exec(label); if(m){ const lx=cx, ly=cy+R+30; s+=`${m[1]}`; s+=``; s+=`${m[2]}`; } else s+=`${label}`; } if(note) s+=`${note}`; s+=``; return s; } const P=[ { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 2조각으로 나누고 1조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:2,shade:1,note:'전체 2조각 중 1조각'}), answer:1, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'1 (분수 1/2)', fig:pie({parts:2,shade:1,label:'1/2'}), steps:['전체를 2조각으로 나눴으니 분모는 2.','그중 1조각을 먹었으니 분자는 1.','분수로 쓰면 1/2 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 4조각으로 나누고 1조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:4,shade:1,note:'전체 4조각 중 1조각'}), answer:1, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'1 (분수 1/4)', fig:pie({parts:4,shade:1,label:'1/4'}), steps:['전체를 4조각으로 나눴으니 분모는 4.','그중 1조각을 먹었으니 분자는 1.','분수로 쓰면 1/4 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 4조각으로 나누고 3조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:4,shade:3,note:'전체 4조각 중 3조각'}), answer:3, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'3 (분수 3/4)', fig:pie({parts:4,shade:3,label:'3/4'}), steps:['전체를 4조각으로 나눴으니 분모는 4.','그중 3조각을 먹었으니 분자는 3.','분수로 쓰면 3/4 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 3조각으로 나누고 2조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:3,shade:2,note:'전체 3조각 중 2조각'}), answer:2, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'2 (분수 2/3)', fig:pie({parts:3,shade:2,label:'2/3'}), steps:['전체를 3조각으로 나눴으니 분모는 3.','그중 2조각을 먹었으니 분자는 2.','분수로 쓰면 2/3 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 3조각으로 나누고 1조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:3,shade:1,note:'전체 3조각 중 1조각'}), answer:1, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'1 (분수 1/3)', fig:pie({parts:3,shade:1,label:'1/3'}), steps:['전체를 3조각으로 나눴으니 분모는 3.','그중 1조각을 먹었으니 분자는 1.','분수로 쓰면 1/3 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 5조각으로 나누고 2조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:5,shade:2,note:'전체 5조각 중 2조각'}), answer:2, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'2 (분수 2/5)', fig:pie({parts:5,shade:2,label:'2/5'}), steps:['전체를 5조각으로 나눴으니 분모는 5.','그중 2조각을 먹었으니 분자는 2.','분수로 쓰면 2/5 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 5조각으로 나누고 3조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:5,shade:3,note:'전체 5조각 중 3조각'}), answer:3, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'3 (분수 3/5)', fig:pie({parts:5,shade:3,label:'3/5'}), steps:['전체를 5조각으로 나눴으니 분모는 5.','그중 3조각을 먹었으니 분자는 3.','분수로 쓰면 3/5 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 6조각으로 나누고 1조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:6,shade:1,note:'전체 6조각 중 1조각'}), answer:1, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'1 (분수 1/6)', fig:pie({parts:6,shade:1,label:'1/6'}), steps:['전체를 6조각으로 나눴으니 분모는 6.','그중 1조각을 먹었으니 분자는 1.','분수로 쓰면 1/6 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 6조각으로 나누고 5조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:6,shade:5,note:'전체 6조각 중 5조각'}), answer:5, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'5 (분수 5/6)', fig:pie({parts:6,shade:5,label:'5/6'}), steps:['전체를 6조각으로 나눴으니 분모는 6.','그중 5조각을 먹었으니 분자는 5.','분수로 쓰면 5/6 이에요.']}}, { tier:'기초', type:'self', kind:'num', q:'피자를 똑같이 8조각으로 나누고 3조각을 먹었습니다. 먹은 양을 분수로 쓰면 분자는?', fig:pie({parts:8,shade:3,note:'전체 8조각 중 3조각'}), answer:3, hint:'분수는 전체 몇 조각 중 몇 조각! 아래(분모)=전체 조각 수, 위(분자)=센 조각 수.', sol:{ ans:'3 (분수 3/8)', fig:pie({parts:8,shade:3,label:'3/8'}), steps:['전체를 8조각으로 나눴으니 분모는 8.','그중 3조각을 먹었으니 분자는 3.','분수로 쓰면 3/8 이에요.']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 2조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:2,shade:1,note:'한 조각은 얼마?'}), answer:2, hint:'2조각으로 나눈 것 중 하나 = 1/2 이에요.', sol:{ ans:'2 (분수 1/2)', fig:null, steps:['전체를 2조각으로 똑같이 나눔 → 분모는 2.','한 조각이니 분자는 1 → 1/2.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 4조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:4,shade:1,note:'한 조각은 얼마?'}), answer:4, hint:'4조각으로 나눈 것 중 하나 = 1/4 이에요.', sol:{ ans:'4 (분수 1/4)', fig:null, steps:['전체를 4조각으로 똑같이 나눔 → 분모는 4.','한 조각이니 분자는 1 → 1/4.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 3조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:3,shade:1,note:'한 조각은 얼마?'}), answer:3, hint:'3조각으로 나눈 것 중 하나 = 1/3 이에요.', sol:{ ans:'3 (분수 1/3)', fig:null, steps:['전체를 3조각으로 똑같이 나눔 → 분모는 3.','한 조각이니 분자는 1 → 1/3.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 5조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:5,shade:1,note:'한 조각은 얼마?'}), answer:5, hint:'5조각으로 나눈 것 중 하나 = 1/5 이에요.', sol:{ ans:'5 (분수 1/5)', fig:null, steps:['전체를 5조각으로 똑같이 나눔 → 분모는 5.','한 조각이니 분자는 1 → 1/5.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 6조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:6,shade:1,note:'한 조각은 얼마?'}), answer:6, hint:'6조각으로 나눈 것 중 하나 = 1/6 이에요.', sol:{ ans:'6 (분수 1/6)', fig:null, steps:['전체를 6조각으로 똑같이 나눔 → 분모는 6.','한 조각이니 분자는 1 → 1/6.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 8조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:8,shade:1,note:'한 조각은 얼마?'}), answer:8, hint:'8조각으로 나눈 것 중 하나 = 1/8 이에요.', sol:{ ans:'8 (분수 1/8)', fig:null, steps:['전체를 8조각으로 똑같이 나눔 → 분모는 8.','한 조각이니 분자는 1 → 1/8.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 10조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:10,shade:1,note:'한 조각은 얼마?'}), answer:10, hint:'10조각으로 나눈 것 중 하나 = 1/10 이에요.', sol:{ ans:'10 (분수 1/10)', fig:null, steps:['전체를 10조각으로 똑같이 나눔 → 분모는 10.','한 조각이니 분자는 1 → 1/10.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 7조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:7,shade:1,note:'한 조각은 얼마?'}), answer:7, hint:'7조각으로 나눈 것 중 하나 = 1/7 이에요.', sol:{ ans:'7 (분수 1/7)', fig:null, steps:['전체를 7조각으로 똑같이 나눔 → 분모는 7.','한 조각이니 분자는 1 → 1/7.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 9조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:9,shade:1,note:'한 조각은 얼마?'}), answer:9, hint:'9조각으로 나눈 것 중 하나 = 1/9 이에요.', sol:{ ans:'9 (분수 1/9)', fig:null, steps:['전체를 9조각으로 똑같이 나눔 → 분모는 9.','한 조각이니 분자는 1 → 1/9.','분모가 클수록 조각은 작아져요!']}}, { tier:'중급', type:'self', kind:'num', q:'전체를 똑같이 12조각으로 나눈 것 중 한 조각은 얼마일까요? (분모만 숫자로)', fig:pie({parts:12,shade:1,note:'한 조각은 얼마?'}), answer:12, hint:'12조각으로 나눈 것 중 하나 = 1/12 이에요.', sol:{ ans:'12 (분수 1/12)', fig:null, steps:['전체를 12조각으로 똑같이 나눔 → 분모는 12.','한 조각이니 분자는 1 → 1/12.','분모가 클수록 조각은 작아져요!']}}, { tier:'상위', type:'self', kind:'choice', q:'1/2 과 1/4 중 더 큰 분수는?', fig:fbar({bars:[{parts:2,shade:1,label:'1/2',color:'#4E86C4',unitMark:false},{parts:4,shade:1,label:'1/4',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['1/2','1/4','두 분수는 크기가 같다','알 수 없다'], answer:'1/2', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'1/2', fig:null, steps:['1/2 과 1/4 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','1/2 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'1/3 과 1/6 중 더 큰 분수는?', fig:fbar({bars:[{parts:3,shade:1,label:'1/3',color:'#4E86C4',unitMark:false},{parts:6,shade:1,label:'1/6',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['1/3','1/6','두 분수는 크기가 같다','알 수 없다'], answer:'1/3', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'1/3', fig:null, steps:['1/3 과 1/6 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','1/3 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'2/3 과 1/3 중 더 큰 분수는?', fig:fbar({bars:[{parts:3,shade:2,label:'2/3',color:'#4E86C4',unitMark:false},{parts:3,shade:1,label:'1/3',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['2/3','1/3','두 분수는 크기가 같다','알 수 없다'], answer:'2/3', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'2/3', fig:null, steps:['2/3 과 1/3 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','2/3 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'3/4 과 1/4 중 더 큰 분수는?', fig:fbar({bars:[{parts:4,shade:3,label:'3/4',color:'#4E86C4',unitMark:false},{parts:4,shade:1,label:'1/4',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['3/4','1/4','두 분수는 크기가 같다','알 수 없다'], answer:'3/4', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'3/4', fig:null, steps:['3/4 과 1/4 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','3/4 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'1/2 과 1/3 중 더 큰 분수는?', fig:fbar({bars:[{parts:2,shade:1,label:'1/2',color:'#4E86C4',unitMark:false},{parts:3,shade:1,label:'1/3',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['1/2','1/3','두 분수는 크기가 같다','알 수 없다'], answer:'1/2', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'1/2', fig:null, steps:['1/2 과 1/3 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','1/2 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'2/5 과 1/5 중 더 큰 분수는?', fig:fbar({bars:[{parts:5,shade:2,label:'2/5',color:'#4E86C4',unitMark:false},{parts:5,shade:1,label:'1/5',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['2/5','1/5','두 분수는 크기가 같다','알 수 없다'], answer:'2/5', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'2/5', fig:null, steps:['2/5 과 1/5 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','2/5 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'3/5 과 2/5 중 더 큰 분수는?', fig:fbar({bars:[{parts:5,shade:3,label:'3/5',color:'#4E86C4',unitMark:false},{parts:5,shade:2,label:'2/5',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['3/5','2/5','두 분수는 크기가 같다','알 수 없다'], answer:'3/5', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'3/5', fig:null, steps:['3/5 과 2/5 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','3/5 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'1/4 과 1/8 중 더 큰 분수는?', fig:fbar({bars:[{parts:4,shade:1,label:'1/4',color:'#4E86C4',unitMark:false},{parts:8,shade:1,label:'1/8',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['1/4','1/8','두 분수는 크기가 같다','알 수 없다'], answer:'1/4', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'1/4', fig:null, steps:['1/4 과 1/8 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','1/4 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'5/6 과 1/6 중 더 큰 분수는?', fig:fbar({bars:[{parts:6,shade:5,label:'5/6',color:'#4E86C4',unitMark:false},{parts:6,shade:1,label:'1/6',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['5/6','1/6','두 분수는 크기가 같다','알 수 없다'], answer:'5/6', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'5/6', fig:null, steps:['5/6 과 1/6 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','5/6 가 더 커요.']}}, { tier:'상위', type:'self', kind:'choice', q:'2/4 과 1/4 중 더 큰 분수는?', fig:fbar({bars:[{parts:4,shade:2,label:'2/4',color:'#4E86C4',unitMark:false},{parts:4,shade:1,label:'1/4',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['2/4','1/4','두 분수는 크기가 같다','알 수 없다'], answer:'2/4', hint:'그림으로 색칠된 넓이를 비교해 보세요. 분모가 같으면 분자가 큰 쪽!', sol:{ ans:'2/4', fig:null, steps:['2/4 과 1/4 를 피자로 그려 비교해요.','색칠된 부분이 더 넓은 쪽이 큰 분수.','2/4 가 더 커요.']}}, { tier:'최상위', type:'self', kind:'num', q:'피자를 4조각으로 나눠 4조각을 모두 먹으면 분수로 얼마일까요? (분자만)', fig:pie({parts:4,shade:4,label:'4/4',note:'전체 = 1'}), answer:4, hint:'4/4 는 전체와 같아요!', sol:{ ans:'4 (4/4 = 1)', fig:null, steps:['4조각 중 4조각 = 4/4.','4/4 = 1 (전체).','분자와 분모가 같으면 항상 1이에요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'1/2 과 2/4 는 크기가 같을까요, 다를까요?', fig:fbar({bars:[{parts:2,shade:1,label:'1/2',color:'#4E86C4',unitMark:false},{parts:4,shade:2,label:'2/4',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['1/2 이 크다','2/4 가 크다','크기가 같다','알 수 없다'], answer:'크기가 같다', hint:'그림으로 색칠된 넓이를 비교해 보세요.', sol:{ ans:'크기가 같다', fig:null, steps:['1/2 = 절반, 2/4 = 4조각 중 2조각 = 절반.','크기가 같아요 — 조각을 더 잘게 나눴을 뿐!','이렇게 크기가 같은 분수를 크기가 같은 분수라고 해요.']}}, { tier:'최상위', type:'self', kind:'choice', q:'분모가 클수록 한 조각의 크기는 어떻게 될까요?', fig:fbar({bars:[{parts:2,shade:1,label:'1/2',color:'#4E86C4',unitMark:false},{parts:8,shade:1,label:'1/8',color:'#C0503D',unitMark:false}],note:'한 조각의 크기 비교'}), choices:['커진다','작아진다','그대로다','알 수 없다'], answer:'작아진다', hint:'1/2 과 1/8 중 한 조각이 더 큰 건?', sol:{ ans:'작아진다', fig:null, steps:['같은 피자를 2조각으로 나누면 크고, 8조각으로 나누면 작아요.','1/2 > 1/8.','분모가 클수록 조각은 작아집니다 — 많이 나눌수록 하나가 작아지니까요!']}}, { tier:'최상위', type:'self', kind:'num', q:'피자 8조각 중 3조각을 먹었습니다. 남은 피자를 분수로 쓰면 분자는?', fig:pie({parts:8,shade:3,note:'3조각을 먹었어요 — 남은 건?'}), answer:5, hint:'8조각 중 3조각을 먹었으니 남은 건 몇 조각?', sol:{ ans:'5 (5/8)', fig:pie({parts:8,shade:5,label:'5/8',note:'남은 5조각'}), steps:['8 − 3 = 5조각 남았어요.','분수로 쓰면 5/8.','먹은 3/8 + 남은 5/8 = 8/8 = 1 (전체) ✓']}}, { tier:'최상위', type:'self', kind:'num', q:'1/3 이 3개 모이면 얼마일까요? (자연수로)', fig:pie({parts:3,shade:3,label:'3/3',note:'1/3 이 3개 = 전체'}), answer:1, hint:'1/3 + 1/3 + 1/3 = 3/3 = ?', sol:{ ans:'1', fig:null, steps:['1/3 이 3개 = 3/3.','3/3 = 1 (전체).','분모만큼 모이면 1이 돼요!']}}, { tier:'최상위', type:'self', kind:'num', q:'1/4 이 2개 모이면 얼마일까요? (분모만 숫자로)', fig:pie({parts:4,shade:2,label:'2/4',note:'1/4 이 2개'}), answer:2, hint:'1/4 + 1/4 = 2/4 = 1/2', sol:{ ans:'2 (1/2)', fig:null, steps:['1/4 이 2개 = 2/4.','2/4 = 1/2 (절반).','분모가 2인 분수가 돼요!']}}, { tier:'최상위', type:'self', kind:'num', q:'피자를 6조각으로 나눠 2조각을 먹었습니다. 먹은 양은 전체의 얼마일까요? (분모만)', fig:pie({parts:6,shade:2,note:'6조각 중 2조각'}), answer:3, hint:'2/6 을 더 큰 조각으로 묶으면?', sol:{ ans:'3 (1/3)', fig:pie({parts:3,shade:1,label:'1/3',note:'2개씩 묶으면 1/3'}), steps:['6조각 중 2조각 = 2/6.','2개씩 묶으면 3묶음 중 1묶음 = 1/3.','분모는 3!']}}, { tier:'최상위', type:'self', kind:'num', q:'3/4 과 1/4 을 합치면 얼마일까요? (자연수로)', fig:pie({parts:4,shade:4,label:'4/4',note:'3조각 + 1조각 = 전체'}), answer:1, hint:'3조각 + 1조각 = 4조각 = 전체', sol:{ ans:'1', fig:null, steps:['3/4 + 1/4 = 4/4.','4/4 = 1 (전체).','분모가 같으면 분자끼리 더해요!']}}, { tier:'최상위', type:'self', kind:'num', q:'1/2 은 1/8 이 몇 개일까요?', fig:fbar({bars:[{parts:2,shade:1,label:'1/2',color:'#4E86C4',unitMark:false},{parts:8,shade:4,label:'4/8',color:'#C0503D',unitMark:true}],note:'같은 크기를 다르게 나눈 것'}), answer:4, hint:'반쪽 안에 8분의 1이 몇 개 들어갈까요?', sol:{ ans:'4개', fig:null, steps:['1/2 = 4/8 (8조각으로 나누면 4조각).','그래서 1/8 이 4개.','작은 조각으로 바꿔 세면 보여요!']}}, { tier:'최상위', type:'self', kind:'choice', q:'2/3 과 2/5 중 더 큰 분수는?', fig:fbar({bars:[{parts:3,shade:2,label:'2/3',color:'#4E86C4',unitMark:false},{parts:5,shade:2,label:'2/5',color:'#C0503D',unitMark:false}],note:'색칠된 길이를 비교해 보세요'}), choices:['2/3','2/5','크기가 같다','알 수 없다'], answer:'2/3', hint:'분자가 같으면 분모가 작은 쪽이 커요!', sol:{ ans:'2/3', fig:null, steps:['분자가 둘 다 2 — 조각 개수가 같아요.','분모가 작을수록 한 조각이 커요(3조각 vs 5조각).','그래서 2/3이 더 커요.']}}, ]; 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:'초3 분수' }); 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();