{"id":187907,"student_id":10,"content":"{\"html\":\"\u003c!DOCTYPE html\u003e\\n\u003chtml lang=\\\"en\\\"\u003e\\n\\n\u003chead\u003e\\n \u003cmeta charset=\\\"UTF-8\\\"\u003e\\n \u003cmeta name=\\\"robots\\\" content=\\\"noindex, nofollow\\\"\u003e\\n \u003cmeta name=\\\"googlebot\\\" content=\\\"noindex, nofollow\\\"\u003e\\n \u003cmeta name=\\\"viewport\\\" content=\\\"width=device-width, initial-scale=1.0\\\"\u003e\\n \u003ctitle\u003eDocument\u003c/title\u003e\\n \u003clink rel=\\\"stylesheet\\\" href=\\\"https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css\\\"\u003e\\n \u003c!-- \u003clink rel=\\\"stylesheet\\\" href=\\\"./index.css\\\"\u003e --\u003e\\n \u003cscript src=\\\"https://cdn.jsdelivr.net/npm/vue\\\"\u003e\u003c/script\u003e\\n\u003c/head\u003e\\n\\n\u003cbody\u003e\\n \u003cdiv id=\\\"app\\\"\u003e\\n \u003cdiv class=\\\"container py-5\\\" v-if=\\\"isShowMenu\\\"\u003e\\n\\n \u003cdiv class=\\\"mt-5\\\"\u003e\\n \u003ch1 class=\\\"my-5 text-center\\\"\u003e模擬測驗\u003c/h1\u003e\\n \u003cdiv class=\\\"row justify-content-center\\\"\u003e\\n \u003cdiv class=\\\"col-4\\\" v-for=\\\"e in exams\\\" v-if=\\\"e.type == EXAM_TYPE_MOCK\\\"\u003e\\n \u003cdiv class=\\\"text-center shadow bg-white p-5 rounded border border-inf\\\"\u003e\\n \u003ch3 class=\\\"mb-4\\\"\u003e{{e.title}}\u003c/h3\u003e\\n \u003cp\u003e{{e.description}}\u003c/p\u003e\\n \u003cp\u003e總共 {{e.length}} 題,作答時間 {{getExamTimeSec(e) / 60}} 分鐘\u003c/p\u003e\\n \u003cp v-if=\\\"isExistScoreOf(e.id)\\\"\u003e\\n 答對數/總題數:{{localStorage.getItem('exam_' + e.id)}}\\n \u003c/p\u003e\\n \u003cp v-else\u003e\\n 答對數/總題數:尚未作答\\n \u003c/p\u003e\\n \u003cbutton href=\\\"#\\\" class=\\\"btn btn-lg btn-block btn-danger\\\" @click=\\\"showExam(e.id)\\\"\u003e開始測驗\u003c/button\u003e\\n \u003cbutton href=\\\"#\\\" class=\\\"btn btn-block\\\" :class=\\\"isExistScoreOf(e.id) ? 'btn-warning' : 'btn-secondary'\\\" @click=\\\"showReview(e.id)\\\" :disabled=\\\"!isExistScoreOf(e.id)\\\"\u003e看解答\u003c/button\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\\n \u003cdiv class=\\\"mt-5\\\"\u003e\\n \u003ch1 class=\\\"my-5 text-center\\\"\u003e基本練習\u003c/h1\u003e\\n \u003cdiv class=\\\"row justify-content-center\\\"\u003e\\n \u003cdiv class=\\\"col-3 mb-4\\\" v-for=\\\"e in exams\\\" v-if=\\\"e.type == EXAM_TYPE_BASIC\\\"\u003e\\n \u003cdiv class=\\\"text-center shadow bg-white p-4 rounded border border-inf\\\"\u003e\\n \u003ch3 class=\\\"mb-4\\\"\u003e{{e.title}}\u003c/h3\u003e\\n \u003cp\u003e{{e.description}}\u003c/p\u003e\\n \u003cp\u003e\\n 總共 {{e.length}} 題\\n \u003cbr/\u003e\\n 作答時間 {{getExamTimeSec(e) / 60}} 分鐘\\n \u003cbr/\u003e\\n \\n \u003c/p\u003e\\n \u003cp v-if=\\\"isExistScoreOf(e.id)\\\"\u003e\\n 答對數/總題數:{{localStorage.getItem('exam_' + e.id)}}\\n \u003c/p\u003e\\n \u003cp v-else\u003e\\n 答對數/總題數:尚未作答\\n \u003c/p\u003e\\n \u003cbutton href=\\\"#\\\" class=\\\"btn btn-block btn-danger\\\" @click=\\\"showExam(e.id)\\\"\u003e開始測驗\u003c/button\u003e\\n \u003cbutton href=\\\"#\\\" class=\\\"btn btn-block\\\" :class=\\\"isExistScoreOf(e.id) ? 'btn-warning' : 'btn-secondary'\\\" @click=\\\"showReview(e.id)\\\" :disabled=\\\"!isExistScoreOf(e.id)\\\"\u003e看解答\u003c/button\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\\n \u003c/div\u003e\\n\\n \u003cdiv v-if=\\\"isShowResult\\\" class=\\\"cover\\\" style=\\\"z-index: 100;\\\"\u003e\\n \u003cdiv class=\\\"container p-5\\\"\u003e\\n \u003cdiv class=\\\"alert alert-info\\\"\u003e\\n \u003ch3\u003e結果\u003c/h3\u003e\\n \u003cp\u003e總共 {{exam.length}} 題\u003c/p\u003e\\n \u003cp\u003e答對 {{countCorrectAnswer()}} 題\u003c/p\u003e\\n \u003cp\u003e得分 {{countCorrectAnswer() * 2.5}} / 100\u003c/p\u003e\\n \u003c/div\u003e\\n \u003ctable class=\\\"table\\\"\u003e\\n \u003ctr\u003e\\n \u003cth scope=\\\"col\\\"\u003e題號\u003c/th\u003e\\n \u003cth scope=\\\"col\\\"\u003e類型\u003c/th\u003e\\n \u003cth scope=\\\"col\\\"\u003e是否答對\u003c/th\u003e\\n \u003c/tr\u003e\\n \u003ctr v-for=\\\"e, index in exam\\\" :class=\\\"isCorrect(index) ? 'table-success' : 'table-danger'\\\"\u003e\\n \u003ctd\u003e{{index + 1}}\u003c/td\u003e\\n \u003ctd\u003e{{typeToText(e.type)}}\u003c/td\u003e\\n \u003ctd\u003e{{isCorrect(index) ? '答對' : '答錯'}}\u003c/td\u003e\\n \u003c/tr\u003e\\n \u003c/table\u003e\\n \u003cbutton class=\\\"btn btn-lg btn-block btn-danger\\\" @click=\\\"isShowResult = false\\\"\u003e訂正錯誤\u003c/button\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\\n \u003cdiv v-if=\\\"!isShowMenu\\\"\u003e\\n \u003cdiv id=\\\"navbar\\\" class=\\\"d-flex justify-content-end align-items-center\\\"\u003e\\n \\n \u003cdiv class=\\\"d-inline-block mr-auto\\\"\u003e\\n \u003cspan class=\\\"h2\\\"\u003e試題{{current + 1}} (共{{exam.length}}題)\u003c/span\u003e\\n \u003cspan\u003e剩餘時間 {{countdown}}\u003c/span\u003e\\n \u003c/div\u003e\\n \u003cbutton class=\\\"ml-3 btn btn-lg btn-dark\\\" @click=\\\"toggleFullscreen\\\"\u003e進入/取消全螢幕\u003c/button\u003e\\n \u003cbutton class=\\\"ml-3 btn btn-lg btn-info\\\" @click=\\\"showMenu\\\"\u003e返回選單\u003c/button\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"content\\\"\u003e\\n \u003cdiv class=\\\"p-4 content-description\\\"\u003e\\n \u003cpre v-if=\\\"exam[current]\\\"\u003e{{exam[current].description}}\u003c/pre\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"content-editors\\\"\u003e\\n \u003c!-- \u003cdiv class=\\\"tutorial overflow-auto p-2\\\" v-if=\\\"exam[current].tutorial \u0026\u0026 showAnswer\\\"\u003e\\n \u003cpre class=\\\" alert alert-info\\\"\u003e詳解:{{exam[current].tutorial}}\u003c/pre\u003e\\n \u003c/div\u003e --\u003e\\n \u003cks-options-exam\\n v-if=\\\"exam[current] \u0026\u0026 exam[current].type === OPTIONS\\\"\\n :exam=\\\"exam[current]\\\"\\n :answer=\\\"answers[current]\\\"\\n :show_answer=\\\"showAnswer\\\"\\n :can_edit=\\\"canEdit\\\"\\n :type=\\\"typeToText(exam[current].type)\\\"\\n \u003e\u003c/ks-options-exam\u003e\\n \u003cks-true-or-false-exam\\n v-if=\\\"exam[current] \u0026\u0026 exam[current].type === TRUE_OR_FALSE\\\"\\n :exam=\\\"exam[current]\\\"\\n :answer=\\\"answers[current]\\\"\\n :show_answer=\\\"showAnswer\\\"\\n :can_edit=\\\"canEdit\\\"\\n :type=\\\"typeToText(exam[current].type)\\\"\\n \u003e\u003c/ks-true-or-false-exam\u003e\\n \u003cks-select-exam\\n v-if=\\\"exam[current] \u0026\u0026 exam[current].type === SELECT\\\"\\n :exam=\\\"exam[current]\\\"\\n :answer=\\\"answers[current]\\\"\\n :show_answer=\\\"showAnswer\\\"\\n :can_edit=\\\"canEdit\\\"\\n :type=\\\"typeToText(exam[current].type)\\\"\\n \u003e\u003c/ks-select-exam\u003e\\n \u003cks-drag-and-drop-exam\\n v-if=\\\"exam[current] \u0026\u0026 exam[current].type === DRAG_AND_DROP\\\"\\n :exam=\\\"exam[current]\\\"\\n :answer=\\\"answers[current]\\\"\\n :show_answer=\\\"showAnswer\\\"\\n :can_edit=\\\"canEdit\\\"\\n @update_answer=\\\"updateAnswer\\\"\\n :type=\\\"typeToText(exam[current].type)\\\"\\n \u003e\u003c/ks-drag-and-drop-exam\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003cdiv class=\\\"footer d-flex justify-content-end align-items-center\\\"\u003e\\n \u003cbutton class=\\\"ml-3 btn btn-lg btn-dark\\\" @click=\\\"prev\\\" :disabled=\\\"isFirst\\\"\u003e上一題\u003c/button\u003e\\n \u003cbutton class=\\\"ml-3 btn btn-lg btn-dark\\\" @click=\\\"next\\\" :disabled=\\\"isLast\\\"\u003e下一題\u003c/button\u003e\\n \u003cbutton class=\\\"ml-3 btn btn-lg btn-danger\\\" @click=\\\"finish\\\" :disabled=\\\"!isLast\\\"\u003e交卷\u003c/button\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n \u003c/div\u003e\\n\\n \u003c!-- \u003cscript src=\\\"./index.js\\\"\u003e\u003c/script\u003e --\u003e\\n\u003c/body\u003e\\n\\n\u003c/html\u003e\",\"css\":\":root {\\n --navbar-height: 50px;\\n font-family: monospace;\\n}\\n\\n*:disabled {\\n cursor: not-allowed;\\n}\\n\\nbody {\\n font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;\\n color: #555;\\n background-color: #eeeeee;\\n}\\n\\n#app {\\n position: absolute;\\n top: 5px;\\n left: 5px;\\n right: 5px;\\n bottom: 5px;\\n background-color: #eeeeee;\\n}\\n\\n#navbar {\\n position: absolute;\\n top: 0;\\n width: 100%;\\n height: var(--navbar-height);\\n}\\n\\n#app .content {\\n position: absolute;\\n top: var(--navbar-height);\\n width: 100%;\\n height: calc(100vh - 10px - var(--navbar-height)*2);\\n box-sizing: border-box;\\n border: 2px solid #ccc;\\n background-color: #ffffff;\\n}\\n\\n#app .footer {\\n position: absolute;\\n bottom: 0;\\n height: var(--navbar-height);\\n width: 100%; \\n}\\n\\n.content .content-description {\\n border: 1px solid #ccc;\\n height: 40%;\\n width: 100%;\\n position: absolute;\\n top: 0;\\n overflow-y: scroll;\\n}\\n\\n.content .content-editors {\\n border: 1px solid #ccc;\\n height: 60%;\\n width: 100%;\\n position: absolute;\\n bottom: 0;\\n overflow-y: scroll;\\n}\\n\\n.drag_and_drop_select {\\n display: inline-block;\\n position: relative;\\n min-width: 100px;\\n \\n}\\n\\n.drag_and_drop_select \u003e span {\\n \\n}\\n\\n.drag_and_drop_select \u003e select {\\n position: absolute;\\n top: 0;\\n left: 0;\\n z-index: 1;\\n width: 15px;\\n height: 20px;\\n transform: translateY(-10px);\\n}\\n\\n.cover {\\n position: absolute;\\n top: 0;\\n right: 0;\\n left: 0;\\n bottom: 0;\\n z-index: 10;\\n background-color: white;\\n}\\n\\n.grab {\\n cursor: -webkit-grab; cursor: grab;\\n}\\n\\n.tutorial + .cover {\\n top: 100px;\\n}\",\"js\":\"!function n(e,t,i){function r(o,a){if(!t[o]){if(!e[o]){var p=\\\"function\\\"==typeof require\u0026\u0026require;if(!a\u0026\u0026p)return p(o,!0);if(s)return s(o,!0);throw new Error(\\\"Cannot find module '\\\"+o+\\\"'\\\")}var c=t[o]={exports:{}};e[o][0].call(c.exports,(function(n){var t=e[o][1][n];return r(t||n)}),c,c.exports,n,e,t,i)}return t[o].exports}for(var s=\\\"function\\\"==typeof require\u0026\u0026require,o=0;o\u003ci.length;o++)r(i[o]);return r}({1:[function(n,e,t){const{A_TO_Z:i}=n(\\\"./constants\\\");Vue.component(\\\"ks-options-exam\\\",{template:'\\\\n \u003cdiv\u003e\\\\n \u003ch4\u003e\\\\n 回答區\u0026nbsp;\u003csmall class=\\\"h6\\\"\u003e({{type}})\u003c/small\u003e\\\\n \u003c/h4\u003e\\\\n \u003cdiv v-for=\\\"option, index in exam.options\\\" class=\\\"p-2 ks-1 alert\\\" :class=\\\"getClass(index)\\\"\u003e\\\\n \u003cdiv class=\\\"d-inline-block align-top\\\"\u003e\\\\n \u003cinput type=\\\"checkbox\\\" v-model=\\\"answer[index]\\\"\u003e\\\\n \u003cspan class=\\\"px-2\\\"\u003e{{AZ[index]}}.\u003c/span\u003e\\\\n \u003c/div\u003e\\\\n \u003cpre class=\\\"d-inline-block m-0\\\"\u003e{{option}}\u003c/pre\u003e\\\\n \u003cspan class=\\\"text-danger\\\" v-if=\\\"show_answer \u0026\u0026 !isCorrect(index)\\\"\u003e錯誤!\u003c/span\u003e\\\\n \u003c/div\u003e\\\\n \u003c/div\u003e\\\\n ',props:[\\\"type\\\",\\\"exam\\\",\\\"answer\\\",\\\"show_answer\\\",\\\"can_edit\\\"],data:()=\u003e({AZ:i}),methods:{isCorrect(n){return!!this.exam.answer[n]==!!this.answer[n]},getClass(n){return this.show_answer?this.isCorrect(n)?\\\"\\\":\\\"alert-danger\\\":\\\"\\\"}}}),Vue.component(\\\"ks-true-or-false-exam\\\",{template:'\\\\n \u003cdiv\u003e\\\\n \u003ch4\u003e\\\\n 回答區\u0026nbsp;\u003csmall class=\\\"h6\\\"\u003e({{type}})\u003c/small\u003e\\\\n \u003c/h4\u003e\\\\n \u003cdiv class=\\\"alert\\\" v-for=\\\"option, index in exam.options\\\" :class=\\\"getClass(index)\\\"\u003e\\\\n \u003cpre class=\\\"d-inline\\\"\u003e{{option}}\u003c/pre\u003e\\\\n \u003cinput\\\\n type=\\\"radio\\\"\\\\n :name=\\\"index\\\"\\\\n value=\\\"yes\\\"\\\\n :checked=\\\"exam.answer[index] == \\\\'yes\\\\'\\\"\\\\n v-model=\\\"answer[index]\\\"\\\\n /\u003e\u003cspan\u003eYES\u003c/span\u003e\\\\n \u003cinput\\\\n type=\\\"radio\\\"\\\\n :name=\\\"index\\\"\\\\n value=\\\"no\\\"\\\\n :checked=\\\"!exam.answer[index] == \\\\'no\\\\'\\\"\\\\n v-model=\\\"answer[index]\\\" \\\\n /\u003e\u003cspan\u003eNO\u003c/span\u003e\\\\n \u003cspan class=\\\"text-success\\\" v-if=\\\"show_answer \u0026\u0026 isCorrect(index)\\\"\u003e正確!\u003c/span\u003e\\\\n \u003cspan class=\\\"text-danger\\\" v-if=\\\"show_answer \u0026\u0026 !isCorrect(index)\\\"\u003e錯誤!\u003c/span\u003e\\\\n \u003c/div\u003e\\\\n \u003c/div\u003e\\\\n ',props:[\\\"type\\\",\\\"exam\\\",\\\"answer\\\",\\\"show_answer\\\",\\\"can_edit\\\"],data:()=\u003e({AZ:i}),methods:{isCorrect(n){return this.exam.answer[n]===this.answer[n]},getClass(n){return this.show_answer?this.isCorrect(n)?\\\"alert-success\\\":\\\"alert-danger\\\":\\\"\\\"}}}),Vue.component(\\\"ks-drag-and-drop-exam\\\",{template:'\\\\n \u003cdiv class=\\\"cover\\\"\u003e\\\\n \u003cdiv class=\\\"row px-0 h-100\\\"\u003e\\\\n \u003cdiv class=\\\"col-6 border p-4 h-100 overflow-auto\\\"\u003e\\\\n \u003ch4\u003e程式碼片段{{type}}\u003c/h4\u003e\\\\n \u003ctemplate v-for=\\\"option, idx in exam.options\\\"\u003e\\\\n \u003ch5\u003e選項{{AZ[idx]}}\u003c/h5\u003e\\\\n \u003cpre class=\\\"d-inline-block alert alert-secondary p-2 grab\\\"\\\\n draggable=\\\"true\\\"\\\\n @dragstart=\\\"dragstart(idx)\\\"\\\\n \u003e{{option}}\u003c/pre\u003e\\\\n \u003c/template\u003e\\\\n \u003c/div\u003e\\\\n \u003cdiv class=\\\"col-6 border p-4 h-100 overflow-auto\\\"\\\"\u003e\\\\n \u003ch4\u003e\\\\n 回答區\u0026nbsp;\u003csmall class=\\\"h6\\\"\u003e({{type}})\u003c/small\u003e\\\\n \u003c/h4\u003e\\\\n \u003cpre\u003e\\\\n \u003ctemplate v-for=\\\"line in exam.content\\\"\u003e\\\\n \u003cspan v-if=\\\"typeof line === \\\\'string\\\\'\\\"\u003e\\\\n {{line}}\\\\n \u003c/span\u003e\\\\n \u003cspan v-if=\\\"typeof line === \\\\'object\\\\'\\\" class=\\\"p-2 alert drag_and_drop_select\\\" :class=\\\"getClass(line.idx)\\\" @drop=\\\"drop(line.idx)\\\" @dragover=\\\"dragover($event)\\\"\u003e\\\\n \u003cspan class=\\\"d-inline-block\\\"\u003e\\\\n {{exam.options[answer[line.idx]]}}\\\\n \u003c/span\u003e\\\\n \u003c/span\u003e\\\\n \u003c/template\u003e\\\\n \u003c/pre\u003e\\\\n \u003c/div\u003e\\\\n \u003c/div\u003e\\\\n \u003c/div\u003e\\\\n '.replace(/ *\\\\n */g,\\\"\\\"),props:[\\\"type\\\",\\\"exam\\\",\\\"answer\\\",\\\"show_answer\\\",\\\"can_edit\\\"],data:()=\u003e({AZ:i,draggingIndex:void 0}),methods:{isCorrect(n){return this.exam.answer[n]===this.answer[n]},getClass(n){return this.show_answer?this.isCorrect(n)?\\\"alert-success\\\":\\\"alert-danger\\\":\\\"alert-secondary\\\"},dragover(n){n.preventDefault()},dragstart(n){this.draggingIndex=n},drop(n){this.$emit(\\\"update_answer\\\",[n,this.draggingIndex])}}}),Vue.component(\\\"ks-select-exam\\\",{template:'\\\\n \u003cpre\u003e\\\\n \u003ch4\u003e\\\\n 回答區\u0026nbsp;\u003csmall class=\\\"h6\\\"\u003e({{type}})\u003c/small\u003e\\\\n \u003c/h4\u003e\\\\n \u003ctemplate v-for=\\\"(line, idx) in exam.content\\\"\u003e\\\\n \u003cspan v-if=\\\"typeof line === \\\\'string\\\\'\\\"\u003e{{line}}\u003c/span\u003e\\\\n \u003ctemplate v-if=\\\"typeof line === \\\\'object\\\\'\\\"\u003e\\\\n \u003cselect class=\\\"p-1 alert\\\"\\\\n v-model=\\\"answer[line.idx]\\\"\\\\n :class=\\\"getClass(line.idx)\\\"\u003e\\\\n \u003coption v-for=\\\"option, idx in line\\\" :value=\\\"idx\\\" :selected=\\\"idx == line.answer\\\"\u003e\\\\n {{option}}\\\\n \u003c/option\u003e\\\\n \u003c/select\u003e\\\\n \u003cspan class=\\\"px-2 text-success\\\" v-if=\\\"show_answer \u0026\u0026 isCorrect(line.idx)\\\"\u003e正確!\u003c/span\u003e\\\\n \u003cspan class=\\\"px-2 text-danger\\\" v-if=\\\"show_answer \u0026\u0026 !isCorrect(line.idx)\\\"\u003e錯誤!\u003c/span\u003e\\\\n \u003c/template\u003e\\\\n \\\\n \u003c/template\u003e\\\\n \u003c/pre\u003e\\\\n '.replace(/ *\\\\n */g,\\\"\\\"),props:[\\\"type\\\",\\\"exam\\\",\\\"answer\\\",\\\"show_answer\\\",\\\"can_edit\\\"],methods:{isCorrect(n){return this.exam.answer[n]===this.answer[n]},getClass(n){return this.show_answer?this.isCorrect(n)?\\\"alert-success\\\":\\\"alert-danger\\\":\\\"alert-secondary\\\"}}})},{\\\"./constants\\\":2}],2:[function(n,e,t){t.OPTIONS=\\\"options\\\",t.SELECT=\\\"select\\\",t.TRUE_OR_FALSE=\\\"tureOrFalse\\\",t.DRAG_AND_DROP=\\\"dragAndDrop\\\",t.OPTION_SPLITER=\\\"\u003c%==========%\u003e\\\",t.CONTENT_SELECTER=\\\"CONTENT_SELECTER\\\",t.TYPES={OPTIONS:\\\"options\\\",SELECT:\\\"select\\\",TRUE_OR_FALSE:\\\"tureOrFalse\\\",DRAG_AND_DROP:\\\"dragAndDrop\\\"},t.MODE_TEST=\\\"modeTest\\\",t.MODE_SHOW_RESULT=\\\"modeShowResult\\\",t.MODE_SHOW_ALL=\\\"modeShowAll\\\",t.A_TO_Z=\\\"ABCDEFGHIJKLMNOPQRSTUVWZYZ\\\",t.MODE_INIT=0,t.MODE_EXAM=1,t.MODE_RESULT=2,t.MODE_REVIEW=3,t.EXAM_TYPE_BASIC=\\\"basic\\\",t.EXAM_TYPE_MOCK=\\\"mock\\\"},{}],3:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第一週_課堂測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式後,最後一行 a, b 分別會印出什麼?\\\\n\\\\na = 10\\\\nb = 20\\\\na = a + b\\\\nb = a + b\\\\n\\\\nprint(a, b)\\\\n\\\",q.options=`\\\\n30 30\\\\n${r}\\\\n30 50\\\\n${r}\\\\n50 50\\\\n${r}\\\\n10 20\\\\n`,q.content=\\\"\\\",q.answer=[1],q.tutorial=\\\"\\\\na = a + b 執行後 a: 30 b: 20\\\\nb = a + b 執行後 a: 30 b: 50\\\\n\\\",o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式後,最後一行 a, b 分別會印出什麼?\\\\n\\\\na = 10\\\\nb = 20\\\\na += b\\\\nb += a\\\\n\\\\nprint(a, b)\\\\n\\\",q.options=`\\\\n30 30\\\\n${r}\\\\n30 50\\\\n${r}\\\\n50 50\\\\n${r}\\\\n10 20\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = ((10 + 20) * (30 - 40)) / 50\\\\nprint(a)\\\\n\\\\n請問執行以下運算後,程式最後印出 a 結果會是?\\\\n\\\",q.options=`\\\\nA: 6\\\\n${r}\\\\nB: 6.0\\\\n${r}\\\\nC: -6\\\\n${r}\\\\nD: -6.0\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式後將結果 a, b, c 印出來分別是?\\\\n\\\\na = 10 / 3\\\\nb = 10 % 3\\\\nc = 10 // 3\\\\n\\\\nprint(a, b, c)\\\\n\\\",q.options=`\\\\nA: 3.3333333333333335, 1, 3\\\\n${r}\\\\nB: 3, 1, 3.3333333333333335\\\\n${r}\\\\nC: 3, 3.3333333333333335, 1\\\\n${r}\\\\nD: 3.3333333333333335, 1, 3.0\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n執行以下程式輸入分別輸入 30, 40 請問會印出什麼?\\\\n\\\\na = input('加數:')\\\\nb = input('被加數:')\\\\n\\\\nsum = a + b #計算總和\\\\nprint(sum)\\\\n\\\",q.options=`\\\\nA: 30\\\\n${r}\\\\nB: 40\\\\n${r}\\\\nC: 1200\\\\n${r}\\\\nD: 3040\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description='\\\\na = input(\\\"矩形長?\\\")\\\\nb = input(\\\"矩形高?\\\")\\\\n\\\\nprint(\\\"面積是:\\\" + area)\\\\n\\\\n小明遇到了「困難」,他希望寫一隻程式能讓使用者輸入矩形長和高兩個數值,並計算出面積並印出。請你完成第 3 行並幫助小明完成這隻程式?\\\\n',q.options=`\\\\nA: str(int(a) * int(b))\\\\n${r}\\\\nB: int(a) * int(b)\\\\n${r}\\\\nC: str(a * b)\\\\n${r}\\\\nD: int(a * b)\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式會印出?\\\\n\\\\ns = '你好我是{2},我今年{1}歲,我是{0}座'\\\\nprint(s.format('小智', 10, '天蠍'))\\\\n\\\",q.options=`\\\\nA: 你好我是小智,我今年10歲,我是天蠍座\\\\n${r}\\\\nB: 你好我是天蠍,我今年10歲,我是小智座\\\\n${r}\\\\nC: 你好我是小智,我今年天蠍歲,我是10座\\\\n${r}\\\\nD: 程式語法錯誤\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description='\\\\ntype(+1E10)\\\\ntype(5.0)\\\\ntype(\\\"True\\\")\\\\ntype(False)\\\\n\\\\n請問以下何者正確?\\\\n\\\\n',q.options=`\\\\nA: int, int, bool, bool\\\\n${r}\\\\nB: float, float, str, bool\\\\n${r}\\\\nC: int, float, str, bool\\\\n${r}\\\\nD: float, int, str, str\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問以下何者會造成程式出錯?\\\\n\\\",q.options=`\\\\nA: '10' + '10'\\\\n${r}\\\\nB: '10' - '10'\\\\n${r}\\\\nC: '10' * 5\\\\n${r}\\\\nD: '10' / 4\\\\n${r}\\\\nE: 10 * 0\\\\n${r}\\\\nF: 10 / 0\\\\n`,q.content=\\\"\\\",q.answer=[1,3,5],o.push(q),q={},q.type=i,q.description=\\\"\\\\nre = 'Q' + 'm' * 5 + 'm' * 3\\\\nprint(re)\\\\n\\\",q.options=`\\\\nA: Qmmmmmmmm\\\\n${r}\\\\nB: QmQmQmQmQmmmm\\\\n${r}\\\\nC: QmQmQmQmQmmQmQmQmQmQmmQmQmQmQmQmm\\\\n${r}\\\\nD: 程式出錯\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),e.exports=o},{\\\"../constants\\\":2}],4:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第一週_課後測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description='\\\\n請問分別會印出什麼型態?\\\\n\\\\na = 10\\\\nb = \\\"10\\\"\\\\n\\\\nprint(type(a + a))\\\\nprint(type(b + b))\\\\nprint(type(a / a))\\\\nprint(type(a * b))\\\\n',q.options=`\\\\nA: int, str, int, str\\\\n${r}\\\\nB: int, str, float, str\\\\n${r}\\\\nC: int, str, float, float\\\\n${r}\\\\nD: int, int, float, str\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式最後變數 a 會印出什麼?\\\\na = 1\\\\na += 2\\\\na *= 3\\\\na -= 4\\\\na /= 5\\\\n\\\\nprint(a)\\\\n\\\",q.options=`\\\\nA: 1.0\\\\n${r}\\\\nB: 2.0\\\\n${r}\\\\nC: 3.0\\\\n${r}\\\\nD: 4.0\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\n執行以下程式,並分別輸入三個成績 70, 80, 90 請問會印出什麼?\\\\nch = input('國文')\\\\nen = input('英文')\\\\nma = input('數學')\\\\n\\\\navg = ch + en + ma / 3\\\\n\\\\nprint(avg)\\\\n\\\",q.options=`\\\\nA: 180\\\\n${r}\\\\nB: 80\\\\n${r}\\\\nC: 250\\\\n${r}\\\\nD: 程式錯誤\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n這是一個簡單計算 BMI 數值的程式,假設使用者分別輸入\\\\n40 和 2 請問算出來得數值是多少?\\\\n\\\\nw = input('體重KG')\\\\nh = input('身高M')\\\\n\\\\nbmi = w / h * h\\\\n\\\\nprint('BMI 值:' + str(bmi))\\\\n\\\\n\\\",q.options=`\\\\nA: 40.0\\\\n${r}\\\\nB: 40\\\\n${r}\\\\nC: 10.0\\\\n${r}\\\\nD: 10\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\n如果使用者輸入 123456789 程式會印出什麼?\\\\n\\\\npwd = input('請輸入金庫密碼')\\\\n\\\\nif pwd == 123456789:\\\\n print('密碼正確')\\\\nelse:\\\\n print('密碼錯誤')\\\\n\\\",q.options=`\\\\nA: 密碼正確\\\\n${r}\\\\nB: 密碼錯誤\\\\n${r}\\\\nC: 什麼都不會印\\\\n${r}\\\\nD: 程式會出錯無法執行\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),e.exports=o},{\\\"../constants\\\":2}],5:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第二週_課前測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\na = (3 * ( 1 + 2 ) ** 2 - ( 2 ** 2) * 3 )\\\\nprint(a)\\\\n\\\\n執行以下程式請問變數 a 會印出什麼呢?\\\\n\\\",q.options=`\\\\nA: 3\\\\n${r}\\\\nB: 13\\\\n${r}\\\\nC: 15\\\\n${r}\\\\nD: 69\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description='\\\\na = print(\\\"加數?\\\")\\\\nb = print(\\\"被加數?\\\")\\\\n\\\\na += b\\\\nprint(a)\\\\n\\\\n輸入 10, 20 印出?\\\\n',q.options=`\\\\nA: 20\\\\n${r}\\\\nB: 30\\\\n${r}\\\\nC: 1020\\\\n${r}\\\\nD: 程式錯誤無法印出\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = 5.0\\\\nb = 2\\\\n\\\\nprint(a / b)\\\\nprint(a % b)\\\\nprint(a // b)\\\\n\\\\n請問執行以下程式結果會是?\\\\n\\\",q.options=`\\\\nA: 2.5, 1, 2\\\\n${r}\\\\nB: 2.5, 2, 1\\\\n${r}\\\\nC: 2.5, 1.0, 2.0\\\\n${r}\\\\nD: 2.5, 2.0, 1.0\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問使用 type 去判斷以下四個資料分別會得到什麼結果?\\\\n\\\\ntype('123')\\\\ntype(\\\\\\\"True\\\\\\\")\\\\ntype('')\\\\ntype(\\\\\\\"Hello\\\\\\\")\\\\n\\\\n\\\",q.options=`\\\\nA: int, bool, null, str\\\\n${r}\\\\nB: int, str, str, str\\\\n${r}\\\\nC: str, str, null, str\\\\n${r}\\\\nD: str, str, str, str\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n這是一個必較大小的程式,如果輸入一樣大的數字,請問最後印出的結果會是什麼?\\\\n\\\\na = int(input('請輸入a:'))\\\\nb = int(input('請輸入b:'))\\\\n\\\\nif a \u003e b:\\\\n print('a 比較大啦')\\\\nelse:\\\\n print('b 比較大啦')\\\\n\\\\n\\\",q.options=`\\\\nA: a 比較大啦\\\\n${r}\\\\nB: b 比較大啦\\\\n${r}\\\\nC: a 跟 b 一樣大\\\\n${r}\\\\nD: 什麼都不會印出來\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),e.exports=o},{\\\"../constants\\\":2}],6:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第爾週\\\\b_課堂中測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\n小明媽媽說考及格滿六十分才可以去看電視,請問第 2 行可以填入什麼?\\\\ngrade = input('分數:')\\\\n\\\\nif grade \u003e= 60:\\\\n print('可以去看電視')\\\\n\\\\n print('不可以')\\\\n\\\\n\\\",q.options=`\\\\nA: if score \u003c 60:\\\\n${r}\\\\nB: elif score \u003c 60:\\\\n${r}\\\\nC: else:\\\\n${r}\\\\nD: 以上皆可\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n執行以下程式分別輸入 10, 10, 5 請問程式會印出什麼?\\\\n\\\\na = int(input('a'))\\\\nb = int(input('b'))\\\\nc = int(input('c'))\\\\n\\\\nif a \u003e b:\\\\n if a \u003e c:\\\\n print('a 最大')\\\\n else:\\\\n print('b 最大')\\\\nelse:\\\\n if b \u003e c:\\\\n print('b 最大')\\\\n else:\\\\n print('c 最大')\\\\n\\\",q.options=`\\\\nA: a 最大\\\\n${r}\\\\nB: b 最大\\\\n${r}\\\\nC: c 最大\\\\n${r}\\\\nD: 什麼都不會印出來\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\nx = int(input('x座標'))\\\\ny = int(input('y座標'))\\\\n\\\\nif x \u003e 0:\\\\n if y \u003e 0:\\\\n print('第A象限')\\\\n else:\\\\n print('第B象限')\\\\nelse:\\\\n if y \u003e 0:\\\\n print('第C象限')\\\\n else:\\\\n print('第D象限')\\\\n\\\\n請問輸入座標 0, 0 會印出?\\\\n\\\\n\\\",q.options=`\\\\nA: 原點\\\\n${r}\\\\nB: 第B象限\\\\n${r}\\\\nC: 第C象限\\\\n${r}\\\\nD: 第D象限\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問在輸入合法的三角形三個邊長情況下,何種三角形程式判斷會有錯誤的結果?\\\\n\\\\na = input('三角形第一個邊長:')\\\\nb = input('三角形第二個邊長:')\\\\nc = input('三角形第三個邊長:')\\\\n\\\\nif a == b or b == c or c == a:\\\\n print('等腰三角形')\\\\n\\\\nelif a == b and b == c:\\\\n print('正三角形')\\\\n\\\\nelse:\\\\n print('三邊不等長三角形')\\\\n\\\\n\\\",q.options=`\\\\nA: 正三角形\\\\n${r}\\\\nB: 等腰三角形\\\\n${r}\\\\nC: 三邊不等長三角形\\\\n${r}\\\\nD: 無錯誤\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n以下是一個比大小的程式,如果輸入兩個一樣的數值會發生什麼事情?\\\\n\\\\na = float(input('a'))\\\\nb = float(input('b'))\\\\n\\\\nif a \u003e b:\\\\n print('a 比較大')\\\\n\\\\nelse:\\\\n print('b 比較大')\\\\n\\\",q.options=`\\\\nA: a 必較大\\\\n${r}\\\\nB: b 必較大\\\\n${r}\\\\nC: a、b 一樣大\\\\n${r}\\\\nD: 程式語法有錯\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description='\\\\n你寫了一個 Python 程式來比較數字如下\\\\n請問底下關於這個程式的敘述何者錯誤?\\\\n\\\\n\\\\na = eval(input(\\\"a:\\\"))\\\\nb = eval(input(\\\"b:\\\"))\\\\n\\\\nif a \u003c= b:\\\\n print(\\\"a 小於 b\\\")\\\\nif a \u003e b:\\\\n print(\\\"a 大於 b\\\")\\\\nif a = b:\\\\n print(\\\"a 和 b 是相等的\\\")\\\\n',q.options=`\\\\nA: eval 可以用 float 取代\\\\n${r}\\\\nB: 第 5 行只有在 a 比 b 小時才會印出\\\\n${r}\\\\nC: 第 7 行只有在 a 比 b 大時才會印出\\\\n${r}\\\\nD: 第 8 行程式有錯\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description='\\\\n底下是一個程式可以判斷使用者輸入數字是幾位數,\\\\n這個程式有一行錯誤造成結果不如預期,請問是第幾行?\\\\n\\\\nnum = int(input (\\\"請翰入一個數字:\\\"))\\\\n\\\\nif num \u003e -10 and num \u003c10:\\\\n print(\\\"一位數\\\")\\\\nif num \u003e -100 and num \u003c 100:\\\\n print(\\\"二位數\\\")\\\\nelse:\\\\n print(\\\"二位數以上\\\")\\\\n\\\\n',q.options=`\\\\n1\\\\n${r}\\\\n3\\\\n${r}\\\\n4\\\\n${r}\\\\n7\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\ngrade = float(input('輸入成績:'))\\\\n\\\\nif grade \u003c 60:\\\\n print('E')\\\\nelif grade \u003c 70:\\\\n print('D')\\\\nelif grade \u003c 80:\\\\n print('C')\\\\nelif grade \u003c 90:\\\\n print('B')\\\\nelse:\\\\n print('A')\\\\n\\\\n\\\\n請問執行以下程式輸入 60 分會印出什麼等級?\\\\n\\\",q.options=`\\\\nA: E\\\\n${r}\\\\nB: D\\\\n${r}\\\\nC: C\\\\n${r}\\\\nD: B\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\nchinese = int(input('國文成績'))\\\\nenglish = int(input('英文成績'))\\\\n\\\\nif chinese \u003e 60:\\\\n if english \u003e 60:\\\\n print('你可以出去玩!')\\\\n else:\\\\n print('不能出去玩!')\\\\n\\\\n\\\\n如果成績分別輸入 60, 90 會印出?\\\\n\\\",q.options=`\\\\nA: 你可以出去玩\\\\n${r}\\\\nB: 不能出去玩\\\\n${r}\\\\nC: 什麼都不會印\\\\n${r}\\\\nC: 程式會報錯誤\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\n執行以下程式最後一行 c, d, e 會印出什麼?\\\\n\\\\na = True\\\\nb = Frue\\\\nc = a or b\\\\nd = a and b\\\\ne = c or d\\\\n\\\\nprint(c, d, e)\\\\n\\\\n\\\",q.options=`\\\\nA: True, False, False\\\\n${r}\\\\nB: True, true, True\\\\n${r}\\\\nC: False, False, True\\\\n${r}\\\\nD: True, False, True\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),e.exports=o},{\\\"../constants\\\":2}],7:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第二週_課後測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\ngrade = float(input('輸入成績:'))\\\\n\\\\nif grade \u003c= 60:\\\\n print('E')\\\\nelif grade \u003c= 70:\\\\n print('D')\\\\nelif grade \u003c= 80:\\\\n print('C')\\\\nelif grade \u003c= 90:\\\\n print('B')\\\\nelse:\\\\n print('A')\\\\n\\\\n\\\\n請問執行以下程式輸入 90 分會印出什麼等級?\\\\n\\\\n\\\",q.options=`\\\\nA: A\\\\n${r}\\\\nB: B\\\\n${r}\\\\nC: C\\\\n${r}\\\\nD: D\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n小明的麻麻是一位工程師,小明要將今天考的三科成績輸入進一隻麻麻寫的程式,這隻程式會告訴他今天能ㄅ能出去玩,請問麻麻寫的這隻程式規則是什麼?\\\\n\\\\nch = int(input('國文成績'))\\\\nen = int(input('英文成績'))\\\\nma = int(input('數學成績'))\\\\n\\\\nif ch \u003e= 60 and en \u003e= 60:\\\\n print('可以出去玩')\\\\nif en \u003e= 60 and ma \u003e= 60:\\\\n print('可以出去玩')\\\\nif ma \u003e= 60 and ch \u003e= 60:\\\\n print('可以出去玩')\\\\nelse:\\\\n print('可以出去玩')\\\\n\\\\n\\\",q.options=`\\\\nA: 任一科及格\\\\n${r}\\\\nB: 任兩科及格\\\\n${r}\\\\nC: 任兩科及格但是三科都及格反而不能出去玩\\\\n${r}\\\\nD: 都及格\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n\\\\n底下是一個判斷是否是合法三角形的程式,請問第五行應該填入什麼?\\\\n\\\\na = float(input('邊長1'))\\\\nb = float(input('邊長2'))\\\\nc = float(input('邊長3'))\\\\n\\\\n???\\\\n print('是三角形')\\\\nelse:\\\\n print('不是三角形啦')\\\\n\\\\n\\\",q.options=`\\\\nA: if a + b \u003e c or b + c \u003e a or a + c \u003e b:\\\\n${r}\\\\nB: if a + b \u003e= c or b + c \u003e= a or a + c \u003e= b:\\\\n${r}\\\\nC: if a + b \u003e c and b + c \u003e a and a + c \u003e b:\\\\n${r}\\\\nD: if a + b \u003e= c and b + c \u003e= a and a + c \u003e= b:\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description='\\\\na = 10\\\\nb = \\\"10\\\"\\\\n\\\\nresult = int(str(a + int(b)) + b) / int(b)\\\\n\\\\n請問 result 是多少?\\\\n\\\\n',q.options=`\\\\nA: 4\\\\n${r}\\\\nB: 201\\\\n${r}\\\\nC: 4.0\\\\n${r}\\\\nD: 201.0\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式最後 e, f 會印出什麼?\\\\n\\\\na = 10 \u003e= 10\\\\nb = 10 \u003e 10\\\\nc = a or b\\\\nd = a and b\\\\ne = b or c or d\\\\nf = b and c and d\\\\n\\\\nprint(e, f)\\\\n\\\\n\\\",q.options=`\\\\nA: True, True\\\\n${r}\\\\nB: False, True\\\\n${r}\\\\nC: True, False\\\\n${r}\\\\nD: False, False\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),e.exports=o},{\\\"../constants\\\":2}],8:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第三週\\\\b_課前測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\na = 10\\\\nb = 20\\\\nc = 30\\\\n\\\\na = b + c\\\\nb = b + c\\\\nc = b + c\\\\n\\\\nprint(a + b + c)\\\\n\\\\n請問執行以下程式會印出多少?\\\\n\\\\n\\\",q.options=`\\\\nA: 180\\\\n${r}\\\\nB: 150\\\\n${r}\\\\nC: 120\\\\n${r}\\\\nD: 90\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = '2'\\\\nb = 3\\\\n\\\\nr = str(int(a * b) / b) + a\\\\n\\\\nprint(r)\\\\n\\\\n請問執行以下程式最後會印出什麼?\\\\n\\\\n\\\",q.options=`\\\\nA: 742\\\\n${r}\\\\nB: 74.02\\\\n${r}\\\\nC: 16.5\\\\n${r}\\\\nD: 16.52\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = 10 \u003e 10\\\\nb = 10 \u003e= 10\\\\nc = a and b\\\\nd = a or b\\\\ne = a == b\\\\nf = a != b\\\\n\\\\nprint(a, b, c, d, e, f)\\\\n\\\\n請問執行以下程式後,a, b, c, d, e, f 有多少個 True、False?\\\\n\\\",q.options=`\\\\nA: True: 4, False: 2\\\\n${r}\\\\nB: True: 2, False: 4\\\\n${r}\\\\nC: True: 5, False: 1\\\\n${r}\\\\nD: True: 3, False: 3\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description='\\\\n\\\\nname = \\\\'Tony\\\\'\\\\n\\\\nResult = \\\"{3}/{2}/{1}-{0}\\\".format(\\\"2020\\\", 11, 19.0, name)\\\\n\\\\nprint(result)\\\\n\\\\n\\\\n',q.options=`\\\\nA: Tony/19.0/11-2020\\\\n${r}\\\\nB: Tony/19/11-2020\\\\n${r}\\\\nC: 2020/11/19-Tony\\\\n${r}\\\\nD: 2020/11/19.0-Tony\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\nscore = float(input('成績'))\\\\n\\\\nif score \u003e= 100:\\\\n level = 'A'\\\\n\\\\nif score \u003e= 90:\\\\n level = 'B'\\\\n\\\\nif score \u003e= 80:\\\\n level = 'C'\\\\n\\\\nif score \u003e= 70:\\\\n level = 'D'\\\\n\\\\nif score \u003e= 60:\\\\n level = 'E'\\\\n\\\\nelse:\\\\n level = 'F'\\\\n\\\\nprint(level)\\\\n\\\\n請問輸入 85 分會印出?\\\\n\\\\n\\\",q.options=`\\\\nA: B\\\\n${r}\\\\nB: C\\\\n${r}\\\\nC: D\\\\n${r}\\\\nD: E\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),e.exports=o},{\\\"../constants\\\":2}],9:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第三週_課堂中測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\n請問以下敘述何者正確?\\\\n\\\",q.options=`\\\\nA: 串列的編號是從 0 開始\\\\n${r}\\\\nB: 創造串列用一對中括號表示\\\\n${r}\\\\nC: 串列不能為空\\\\n${r}\\\\nD: 可以使用 len 方法取得串列長度\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr = [0]\\\\narr.append(10)\\\\narr.append(20)\\\\narr.append(30)\\\\narr.pop()\\\\narr = [40] + arr\\\\narr[1] = 50\\\\n\\\\nprint(arr)\\\\n\\\\n[40, 50, 10, 20]\\\\n\\\",q.options=`\\\\nA: [0, 10, 20, 30, 40]\\\\n${r}\\\\nB: [0, 10, 20, 30, 40, 50]\\\\n${r}\\\\nC: [40, 50, 10, 20]\\\\n${r}\\\\nD: [40, 50, 10, 20, 30]\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr = [1, 2, 3]\\\\narr = arr * 3 + arr\\\\nprint(len(arr))\\\\n\\\",q.options=`\\\\nA: 3\\\\n${r}\\\\nB: 6\\\\n${r}\\\\nC: 12\\\\n${r}\\\\nD: 程式會出錯\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\\\\n\\\\na = arr[1]\\\\nb = arr[1:8]\\\\nc = arr[1:8:3]\\\\n\\\\nprint(a, b, c)\\\\n\\\",q.options=`\\\\nA: 1, [2, 3, 4, 5, 6, 7, 8, 9], [2, 5, 8]\\\\n${r}\\\\nB: 1, [2, 3, 4, 5, 6, 7, 8], [2, 5, 8]\\\\n${r}\\\\nC: 2, [2, 3, 4, 5, 6, 7, 8], [2, 5, 8]\\\\n${r}\\\\nD: 2, [2, 3, 4, 5, 6, 7, 8, 9], [2, 5, 8]\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\nscores = [98, 54, 64, 76, 89, 43, 96, 67, 77, 90]\\\\n\\\\nScores 是一個存放 10 位學生成績的陣列,請問如何用程式讓 scores 陣列裡面的分數由大排到小?\\\\n\\\",q.options=`\\\\nA: 先執行 scores.sort() 再執行 scores.reverse()\\\\n${r}\\\\nB: 先執行 scores.reverse() 再執行 scores.sort()\\\\n${r}\\\\nC: scores.sort()\\\\n${r}\\\\nD: 以上皆非\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問最後一行會印出數值多少?\\\\n\\\\nlife = 100\\\\n\\\\nwhile life \u003e 0:\\\\n print('發動激光攻擊,並造成敵人 30 點傷害')\\\\n life -= 30\\\\n\\\\nprint('敵人已死亡')\\\\nprint(life)\\\\n\\\",q.options=`\\\\nA: 0\\\\n${r}\\\\nB: -1\\\\n${r}\\\\nC: -20\\\\n${r}\\\\nD: -30\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr1 = list(range(5))\\\\narr2 = list(range(5, 10))\\\\narr3 = list(range(5, 10, -1))\\\\n\\\\nprint(arr1 + arr2 + arr3)\\\\n\\\\n\\\",q.options=`\\\\nA: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\\\\n${r}\\\\nB: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]\\\\n${r}\\\\nC: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 6, 7, 6]\\\\n${r}\\\\nD: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 9, 6, 7, 6]\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\ni = 1\\\\nfor x in range(10):\\\\n i += 2\\\\n for y in range(10):\\\\n i += 3\\\\n\\\\nprint(i)\\\\n\\\",q.options=`\\\\nA: 111\\\\n${r}\\\\nB: 123\\\\n${r}\\\\nC: 321\\\\n${r}\\\\nD: 以上皆非\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\nx = 0\\\\nwhile x \u003c 10:\\\\n x += 1\\\\n\\\\nfor y in range(10):\\\\n y += 1\\\\n\\\\nprint(x, y)\\\\n\\\\n\\\",q.options=`\\\\nA: 9, 9\\\\n${r}\\\\nB: 9, 10\\\\n${r}\\\\nC: 10, 9\\\\n${r}\\\\nD: 10, 10\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式最後 index 會印出什麼?\\\\n\\\\narr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\\\\n\\\\nindex = 0\\\\nwhile(index \u003c 10):\\\\n print(arr[index])\\\\n if arr[index] == 6:\\\\n break\\\\n else:\\\\n index += 1\\\\n\\\\nprint(index)\\\\n\\\",q.options=`\\\\nA: 5\\\\n${r}\\\\nB: 6\\\\n${r}\\\\nC: 7\\\\n${r}\\\\nD: 8\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),e.exports=o},{\\\"../constants\\\":2}],10:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第三週_課後測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式會印出什麼?\\\\n\\\\na = [1, 2, 3]\\\\nb = [4, 5, 6]\\\\nc = (a + b)*2\\\\n\\\\nprint(c[1], c[9])\\\\n\\\",q.options=`\\\\nA: 1, 1\\\\n${r}\\\\nB: 1, 4\\\\n${r}\\\\nC: 2, 1\\\\n${r}\\\\nD: 2, 4\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\nfor i in range(50, 10, -9):\\\\n print(i)\\\\n\\\\n以下敘述何者錯誤\\\\n\\\",q.options=`\\\\nA: 會印出 4 個數字\\\\n${r}\\\\nB: 印出的數字中最小的會是 14\\\\n${r}\\\\nC: 印出的數字中最大的會是 41\\\\n${r}\\\\nD: 由大印到小\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\nscores 是存放了 100 個學生的考試成績的串列,裡面的分數是由高排到低,你想要過濾掉最低分的五個程式,請問你要底下哪兩個程式碼片段去做到這件事情?\\\\n\\\",q.options=`\\\\nA: scores[:-5]\\\\n${r}\\\\nB: scores[0:-4]\\\\n${r}\\\\nC: scores[0:-5]\\\\n${r}\\\\nD: scores[1:-5]\\\\n${r}\\\\nE: scores[1:-4]\\\\n`,q.content=\\\"\\\",q.answer=[0,2],o.push(q),q={},q.type=i,q.description='\\\\n\\\\n執行以下程式依序會印出什麼?\\\\n\\\\nx = 4\\\\nwhile x \u003e 0:\\\\n if x % 4 == 0:\\\\n print(\\\"a\\\")\\\\n elif x - 2 \u003c 0:\\\\n print(\\\"b\\\")\\\\n elif x / 3 == 0:\\\\n print(\\\"c\\\")\\\\n else:\\\\n print(\\\"d\\\")\\\\n x = x - 1\\\\n\\\\n',q.options=`\\\\nA: a, d, b, b\\\\n${r}\\\\nB: a, d, c, b\\\\n${r}\\\\nC: a, d, d, b\\\\n${r}\\\\nD: d, d, d, b\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description='\\\\naz = \\\"abcdefghijklmnopqrstuvwxyz\\\"\\\\n\\\\nresult = az[5] + az[5:10] + az[5:10:3]\\\\n\\\\nprint(result)\\\\n',q.options=`\\\\nA: fghijfij\\\\n${r}\\\\nB: ffghijfik\\\\n${r}\\\\nC: ffghijfi\\\\n${r}\\\\nD: fghijfi\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),e.exports=o},{\\\"../constants\\\":2}],11:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第四週_課前測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\narr1 = list(range(5))\\\\narr2 = list(range(5, 10))\\\\narr3 = list(range(5, 10, 2))\\\\n\\\\nprint(arr1 + arr2 + arr3)\\\\n\\\",q.options=`\\\\nA: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]\\\\n${r}\\\\nB: [0, 1, 2, 3, 4, 5, 6, 7, 8, 7, 9]\\\\n${r}\\\\nC: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 5, 7, 9]\\\\n${r}\\\\nD: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 5, 7, 9]\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr = [1, 2, 3, 4, 5, 6, 7, 8, 9]\\\\n\\\\narr = [arr[1]] + arr[1:5] + arr[1:5:2]\\\\n\\\\nprint(arr)\\\\n\\\\n請問執行以下程式最後印出 arr 會是什麼?\\\\n\\\",q.options=`\\\\nA: [1, 2, 3, 4, 2, 4]\\\\n${r}\\\\nB: [2, 2, 3, 4, 5, 2, 4]\\\\n${r}\\\\nC: [2, 2, 3, 4, 5, 6, 2, 4]\\\\n${r}\\\\nD: [2, 2, 3, 4, 5, 6, 2, 4, 6]\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問以下何者錯誤\\\\n\\\\narr = ['A', 'P', 'P', 'L', 'E']\\\\n\\\\ni = arr[1]\\\\nj = arr[1:4]\\\\nk = arr[1:4:2]\\\\nl = arr[1:4:-1]\\\\n\\\",q.options=`\\\\nA: i 是 ['p']\\\\n${r}\\\\nB: j 是 ['P', 'P', 'L']\\\\n${r}\\\\nC: k 是 ['P', 'L']\\\\n${r}\\\\nD: l 是 []\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\nwords = ['a', 'p', 'p', 'l', 'e']\\\\n\\\\na = words.index('p')\\\\nB = words.count('p')\\\\n\\\\nprint(a, b)\\\\n\\\\n\\\",q.options=`\\\\nA: 1, 1\\\\n${r}\\\\nB: 1, 2\\\\n${r}\\\\nC: 2, 1\\\\n${r}\\\\nD: 2, 2\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\nscores 是一個存放 10 位學生成績的陣列,請問執行以上程式後以下敘述何者錯誤?\\\\n\\\\nscores = [98, 54, 64, 76, 89, 43, 96, 67, 77, 90]\\\\nscores.sort()\\\\n\\\\nsum = 0\\\\nfor s in scores:\\\\n sum += s\\\\n\\\\na = scores[len(scores) - 1]\\\\nb = scores[0]\\\\nc = sum / (len(scores) - 1)\\\\n\\\\n\\\\n\\\",q.options=`\\\\nA: a 是最高分數\\\\n${r}\\\\nB: b 是最低分數\\\\n${r}\\\\nC: c 是平均分數\\\\n${r}\\\\nD: 以上皆對\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),e.exports=o},{\\\"../constants\\\":2}],12:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"變數\\\",o.description=\\\"第四週_課堂中測驗\\\",q={},q.type=i,q.description=\\\"\\\\ndef add(a, b=10, c=20):\\\\n return a + b + c\\\\n\\\\nresult = add(10) + add(10, 20) + add(10, 20, 30)\\\\n\\\\nprint(result)\\\\n\\\\n請問執行以下程式會印出什麼?\\\\n\\\\n\\\",q.options=`\\\\nA: 100\\\\n${r}\\\\nB: 120\\\\n${r}\\\\nC: 150\\\\n${r}\\\\nD: 190\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\ndef add (a, b):\\\\n return a + b\\\\n\\\\ndef sub (a, b):\\\\n return a - b\\\\n\\\\ndef mult (a, b):\\\\n return a * b\\\\n\\\\nresult = mult(add(10, 20), sub(10, 20))\\\\n\\\\nprint(result)\\\\n\\\\n請問執行以下程式會印出什麼?\\\\n\\\",q.options=`\\\\nA: 300\\\\n${r}\\\\nB: -300\\\\n${r}\\\\nC: 900\\\\n${r}\\\\nD: 900.0\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\ndef add (a, b=10):\\\\n return a + b\\\\n\\\\nsum = add(10) + add(a=20) + add()\\\\nprint(sum)\\\\n\\\\n\\\",q.options=`\\\\nA: 30\\\\n${r}\\\\nB: 50\\\\n${r}\\\\nC: 70\\\\n${r}\\\\nD: 程式會出錯\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\ndef hello(i):\\\\n print(i)\\\\n if i \u003e 0:\\\\n hello(i - 1)\\\\n\\\\nhello(10)\\\\n\\\\n請問執行以下程式會印出幾個數字?\\\\n\\\\n\\\",q.options=`\\\\nA: 9\\\\n${r}\\\\nB: 10\\\\n${r}\\\\nC: 11\\\\n${r}\\\\nD: 12\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = min(2, 3, 4, 5)\\\\nb = max(2, 3, 4, 5)\\\\nc = pow(a, b)\\\\nd = round(c / b)\\\\n\\\\nprint(d)\\\\n\\\\n請問執行以下程式會印出什麼?\\\\n\\\\n\\\",q.options=`\\\\nA: 6\\\\n${r}\\\\nB: 7\\\\n${r}\\\\nC: 6.0\\\\n${r}\\\\nD: 7.0\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\n請問產生 0-1 的隨機小數該執行?\\\\n\\\\nfrom random import random\\\\n\\\\n\\\",q.options=`\\\\nA: random()\\\\n${r}\\\\nB: randrange()\\\\n${r}\\\\nC: random.randrange()\\\\n${r}\\\\nD: random.random()\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\nimport random\\\\n\\\\na = random.randrange(10)\\\\nb = random.randrange(10, 50)\\\\nc = random.randrange(10, 50, 3)\\\\n\\\\n請問以下敘述何者錯誤?\\\\n\\\",q.options=`\\\\nA: a 可能是 10\\\\n${r}\\\\nB: b 可能是 10\\\\n${r}\\\\nC: c 可能是 10\\\\n${r}\\\\nD: c 可能是 40\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = time.time()\\\\ntime.sleep(3)\\\\nb = time.time()\\\\nprint(a - b)\\\\n\\\\n請問最後印出的數字最接近以下何者?\\\\n\\\",q.options=`\\\\nA: 0\\\\n${r}\\\\nB: 3\\\\n${r}\\\\nC: -3\\\\n${r}\\\\nD: 程式最後不會印出任何東西\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\ndef fry (food):\\\\n return '煎' + food\\\\n\\\\ndef sauce(food):\\\\n return food + '醬'\\\\n\\\\ndef add (food_1, food_2):\\\\n return food_1 + '佐' + food_2\\\\n\\\\n\\\\n請問以下和者可以做出「煎培根佐義大利肉醬佐奶油醬」?\\\\n\\\",q.options=`\\\\nA: fry(add(sauce(add('培根', '義大利肉')), sauce('奶油')))\\\\n${r}\\\\nB: add(fry('培根'), add(sauce('義大利肉'), sauce('奶油')))\\\\n${r}\\\\nC: fry(sauce(add(add('培根', '義大利肉'), sauce('奶油'))))\\\\n${r}\\\\nD: fry(add('培根', add(sauce('義大利肉'), sauce('奶油'))))\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = 10\\\\n\\\\ndef test ():\\\\n a = 100\\\\n print(a)\\\\n\\\\nprint(a)\\\\ntest()\\\\nprint(a)\\\\n\\\\n請問執行以下程式會印出什麼?\\\\n\\\\n\\\",q.options=`\\\\nA: 10, 100, 10\\\\n${r}\\\\nB: 10, 100, 100\\\\n${r}\\\\nC: 100, 100, 100\\\\n${r}\\\\nD: 10, 10, 10\\\\n`,q.content=\\\"\\\",q.answer=[0],o.push(q),e.exports=o},{\\\"../constants\\\":2}],13:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第四週_課後測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\narr = [80, 70, 60, 50, 40]\\\\n\\\\narr.sort()\\\\narr.pop()\\\\narr.reverse()\\\\narr.pop()\\\\n\\\\na = min(arr)\\\\nb = max(arr)\\\\n\\\\nprint(a, b)\\\\n\\\\n執行以下程式會印出什麼?\\\\n\\\",q.options=`\\\\nA: 40, 50\\\\n${r}\\\\nB: 50, 60\\\\n${r}\\\\nC: 50, 70\\\\n${r}\\\\nD: 70, 80\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\n你需要去编高程式碼來產生隨機浮點數,最小值是 0.0 最大值1.0 你應該使用哪個語法?\\\\n\\\",q.options=`\\\\nA. random.randrange(0.0, 1.0)\\\\n${r}\\\\nB. random.randrange()\\\\n${r}\\\\nC. random.randint(0, 1)\\\\n${r}\\\\nD. random.random()\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\nlist_1 = [1, 2]\\\\nlist_2 = [3, 4]\\\\nlist_3 = list_1 + list_2\\\\nlist_4 = list_3 * 3\\\\nprint(list_4)\\\\n\\\",q.options=`\\\\nA. [[1, 2], [3, 4], [1, 2], [3, 4], [1, 2], [3, 4]]\\\\n${r}\\\\nB. [[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]\\\\n${r}\\\\nC. [1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]\\\\n${r}\\\\nD. [3, 6, 9, 12]\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\n你在一個為AdventureWorks開發遊戲的国隊工作。\\\\n你需要编寫程式碼來産生一個隨機數來符合以下要求\\\\n數字是5的倍數。\\\\n最低的數字是5。\\\\n*最高的數字是100。\\\\n兩式碼片段將符合要求?每個正的答案都提供了一個院整的解決方案,選兩個。\\\\n\\\\n底下有兩個選項的程式,會產生數字是 5 到 100 之間 5 的倍數的數字(5, 10, 15, … 95, 100)\\\\n\\\",q.options=`\\\\nA. print(randint(0, 20) * 5)\\\\n${r}\\\\nB. print(randint(1, 20) * 5)\\\\n${r}\\\\nC. print(randrange(5, 105, 5))\\\\n${r}\\\\nD. print(randrange(0, 100, 5))\\\\n`,q.content=\\\"\\\",q.answer=[1,2],o.push(q),q={},q.type=i,q.description=\\\"\\\\n你要產生一個隨機數整數,這個隨機數字最大是 11 最小是 5 請問你會用到底下哪兩個方法?\\\\n\\\\n\\\\n\\\",q.options=`\\\\nA. random.randint(5 , 12)\\\\n${r}\\\\nB. random.randrange(5 , 12)\\\\n${r}\\\\nC. random.randint(5 , 11)\\\\n${r}\\\\nD. random.randrange(5 , 11)\\\\n`,q.content=\\\"\\\",q.answer=[1,2],o.push(q),e.exports=o},{\\\"../constants\\\":2}],14:[function(n,e,t){const{OPTIONS:i,OPTION_SPLITER:r,EXAM_TYPE_BASIC:s}=n(\\\"../constants\\\"),o=[];o.type=s,o.title=\\\"第五週_課前測驗\\\",o.description=\\\"變數、型態、輸入輸出\\\",q={},q.type=i,q.description=\\\"\\\\ns = '我的生日是%d月份%s座,今日幸運指數%d%%' % (11, '天蠍座', 100)\\\\n\\\\nprint(s)\\\\n\\\\n請問執行以下程式最後會印出什麼?\\\\n\\\\n\\\",q.options=`\\\\nA: 我的生日是11月份天蠍座,今日幸運指數100%\\\\n${r}\\\\nB: 我的生日是11月份天蠍座,今日幸運指數100%%\\\\n${r}\\\\nC: 我的生日是11月份天蠍座座,今日幸運指數100%\\\\n${r}\\\\nD: 型態不符合,程式出錯\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\narr = [1, 2, 3]\\\\narr = arr * 4 + arr\\\\n\\\\na = arr.count(1)\\\\nb = arr.index(1)\\\\nc = len(arr)\\\\n\\\\nprint(a, b, c)\\\\n\\\\n請問執行以下程式分別會印出什麼?\\\\n\\\",q.options=`\\\\nA: 5, 1, 15\\\\n${r}\\\\nB: 4, 0, 15\\\\n${r}\\\\nC: 5, 0, 12\\\\n${r}\\\\nD: 5, 0, 15\\\\n`,q.content=\\\"\\\",q.answer=[3],o.push(q),q={},q.type=i,q.description=\\\"\\\\nfor i in range(400, 800, 50):\\\\n print(i)\\\\n\\\\n執行以下程式後,請問下列敘述何者正確?\\\\n\\\",q.options=`\\\\nA: 總共會印出 9 個數字\\\\n${r}\\\\nB: 印出的最小數字是 400\\\\n${r}\\\\nC: 印出的最大數字是 800\\\\n${r}\\\\nD: 變數 i 最後的值是 800\\\\n`,q.content=\\\"\\\",q.answer=[1],o.push(q),q={},q.type=i,q.description=\\\"\\\\ngrid = [\\\\n ['A', 'B', 'C'],\\\\n ['D', 'E', 'F'],\\\\n ['G', 'H', 'I'],\\\\n]\\\\n\\\\nprint(grid[2][2])\\\\n\\\\n\\\",q.options=`\\\\nA: 'A'\\\\n${r}\\\\nB: 'E'\\\\n${r}\\\\nC: 'I'\\\\n${r}\\\\nD: 'H'\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),q={},q.type=i,q.description=\\\"\\\\na = len(range(10))\\\\nb = len(range(10, 50))\\\\nc = len(range(10, 50, 5))\\\\n\\\\nprint(a, b, c)\\\\n\\\\n請問執行以下程式 a, b, c 分別會印出什麼?\\\\n\\\",q.options=`\\\\nA: 10, 39, 8\\\\n${r}\\\\nB: 10, 40, 8\\\\n${r}\\\\nC: 10, 40, 9\\\\n${r}\\\\nD: 9, 39, 9\\\\n`,q.content=\\\"\\\",q.answer=[2],o.push(q),e.exports=o},{\\\"../constants\\\":2}],15:[function(n,e,t){const{OPTIONS:i,SELECT:r,TRUE_OR_FALSE:s,DRAG_AND_DROP:o,OPTION_SPLITER:a,CONTENT_SELECTER:p,EXAM_TYPE_MOCK:c}=n(\\\"../constants\\\"),l=[];let d=void 0;l.type=c,l.title=\\\"模擬測驗卷 (1)\\\",l.description=\\\"\\\",d={},d.type=o,d.description=\\\"\\\\n使用以下程式碼片段去創造一個程式,\\\\n\\\\n這個程式會取得使用者的輸入,並判斷是大寫、小寫還是大小寫混用!\\\\n\\\",d.options=`\\\\nelif text.upper() == text:\\\\n print(text,\\\"是全部大寫.\\\")\\\\n${a}\\\\ntext = input(\\\"請輸入一段英文文字:\\\")\\\\n${a}\\\\nelse :\\\\n print(text,\\\"是大小寫混合.\\\")\\\\n${a}\\\\nif text.lower() == text:\\\\n print(text,\\\"是全部小寫\\\")\\\\n${a}\\\\nelse:\\\\n print(text,\\\"是大寫\\\")\\\\n${a}\\\\nelse:\\\\n print(text,\\\"是小寫\\\")\\\\n`,d.content=`\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n`,d.answer=[1,3,0,2],d.tutorial=\\\"\\\\n字串.upper() 會把所有英文字母轉成大寫\\\\n字串.lower() 會把所有英文字母轉成小寫\\\\n\\\",l.push(d),d={},d.type=o,d.description=\\\"\\\\n請拖拉左邊的程式積木,並組合出一個程式會印出 2 ~ 100 之間的所有質數!\\\\n\\\",d.options=`\\\\np = 2\\\\nwhile p \u003c= 100:\\\\n is_prime = True\\\\n${a}\\\\np = 2\\\\nis_prime = True\\\\nwhile p \u003c= 100:\\\\n${a}\\\\nbreak\\\\n${a}\\\\ncontinue\\\\n${a}\\\\np = p + 1\\\\n${a}\\\\nfor i in range(2, p):\\\\n if p /i == 0:\\\\n is_prime = False\\\\n${a}\\\\nfor i in range (2, p):\\\\n if p % i == 0:\\\\n is_prime = False\\\\n`,d.content=`\\\\n${p}\\\\n ${p}\\\\n ${p}\\\\n if is_prime == True:\\\\n print(p)\\\\n ${p}\\\\n\\\\n`,d.answer={0:0,1:6,2:2,3:4},d.tutorial=\\\"\\\\n質數的定義是不能被自己或 1 以外的數字整除\\\\n\\\\n外層 while 迴圈會從 2 檢查到 100\\\\n內層 for 迴圈會從 2 開始去除要檢查的數字,如果整除表示「不是」質數,就會用 break 語法跳離迴圈\\\\n\\\",l.push(d),d={},d.type=r,d.description=\\\"\\\\n你正在編寫一個 Python 程式去驗證員工編號。\\\\n員工編號的格式必須為 ddd-dd-dddd, 並且只包含數字和破折號。如果格式正確, 則程式必須列印 True, 如果格式不正確, 則列印 False。\\\\n你要如何完成這段程式碼? 回答時, 在回答區選擇適當的程式碼片段。\\\\n\\\",d.options=`\\\\nnumber = \\\"\\\"\\\\nnumber = \\\"sentinel\\\"\\\\n${a}\\\\nwhile number != \\\"\\\":\\\\nwhile number != \\\"sentinel\\\":\\\\n${a}\\\\nvalid = False\\\\nvalid = True\\\\n${a}\\\\nvalid = False\\\\nvalid = True\\\\n`,d.content=`\\\\n${p}\\\\nparts = \\\"\\\"\\\\n${p}\\\\n ${p}\\\\n number = input(\\\"請書入編號(格式為 ddd-dd-dddd): \\\")\\\\n parts = number.split('-')\\\\n if len(parts)== 3:\\\\n if len(parts[0]) == 3 and len(parts[1]) == 2 and len(parts[2]) == 4:\\\\n if parts[0].isdigit() and parts[1].isdigit() and parts[2].isdigit():\\\\n ${p}\\\\nprint(valid)\\\\n`,d.answer={0:0,1:1,2:0,3:1},d.tutorial=\\\"\\\\n字串.split() 會根據輸入的符號去切割字串,並回傳一個串列裡面會存放切割後的結果\\\\n字串.isdigit() 會判斷字串是不是都是由阿拉伯數字組合而成\\\\n\\\",l.push(d),d={},d.type=r,d.description=\\\"\\\\n\\\\n你在一家程式教育公司工作,你要寫一隻程式會根據使用者年紀,去推薦對應的課程\\\\n這個程式會判斷使用者輸入的年紀進行分級:\\\\n\\\\n任何 18 歲或以上的人是 A 級\\\\n任何 13 歲或以上, 但小於 18 歲的人是 B 級。\\\\n任何 12 歲以下會是 C 級\\\\n無法分類是 C 級\\\\n\\\\n您需要完成代碼以滿足要求。\\\\n\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n\\\",d.options=`\\\\nage \u003c 13: rating = \\\"C\\\"\\\\nage \u003c 18: rating = \\\"B\\\"\\\\n:rating = \\\"A\\\"\\\\nage == None: rating = \\\"C\\\"\\\\n${a}\\\\nage \u003c 13: rating = \\\"C\\\"\\\\nage \u003c 18: rating = \\\"B\\\"\\\\n:rating = \\\"A\\\"\\\\nage == None:rating = \\\"C\\\"\\\\n${a}\\\\nage \u003c 13: rating = \\\"C\\\"\\\\nage \u003c 18: rating = \\\"B\\\"\\\\n:rating = \\\"A\\\"\\\\nage == None:rating = \\\"C\\\"\\\\n${a}\\\\nage \u003c 13: rating = \\\"C\\\"\\\\nage \u003c 18: rating = \\\"B\\\"\\\\n:rating = \\\"A\\\"\\\\nage == None: rating = \\\"C\\\"\\\\n\\\\n`,d.content=`\\\\ndef get_rating(age):\\\\n rating = \\\"\\\"\\\\n if${p}\\\\n elif${p}\\\\n elif${p}\\\\n else${p}\\\\n return rating\\\\n`,d.tutorial=\\\"\\\\nC 是小於 13 歲不包含 13 歲,所以是用小於 \u003c\\\\nB 是小於 18 歲不包含 18 歲,所以是用小於 \u003c \\\\nNone 在這裡當作是無法分類\\\\n剩下情況都是大於 18 歲所以直接用 else\\\\n\\\",d.answer={0:0,1:1,2:3,3:2},l.push(d),d={},d.type=r,d.description='\\\\n你要寫一隻 myfunc 函式,它會傳入一個數值 a\\\\n\\\\n如果 a 是非負數, 則回傳a ** (1 / b)\\\\n如果 a 是負數且為偶數, 則回傳\\\"結果是虛數\\\"\\\\n如果 a 是負數且為奇數, 則回傳-(-a) ** (1 / b)\\\\n\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n',d.options=`\\\\nif a \u003e= 0:\\\\n${a}\\\\nelse:\\\\n${a}\\\\nif a % 2 == 0:\\\\n${a}\\\\nelse:\\\\n`,d.content=`\\\\ndef myfunc(a,b):\\\\n ${p}\\\\n answer = a **(1 / b)\\\\n ${p}\\\\n ${p}\\\\n answer = \\\"結果是虛數\\\"\\\\n ${p}\\\\n answer = -(-a)**(1/b)\\\\n return answer\\\\n`,d.answer={0:0,1:0,2:0,3:0},d.tutorial=\\\"\\\\n判斷是基數或偶數,只要用 % 除二取餘數,\\\\b如果整除就是偶數,否則就是奇數\\\\n\\\",l.push(d),d={},d.type=r,d.description=\\\"\\\\n您正在為線上產品銷售公司開發Python應用程序。\\\\n\\\\nproductIdList 是產品清單的是識別碼,\\\\n你要撰寫一隻程式逐一查看,並在找到目標產品的識別碼 6 時就進行跳脫\\\\n\\\\n請試著完成以上敘述的程式\\\\n\\\",d.options=`\\\\nwhile\\\\nfor\\\\nif\\\\nbreak\\\\n${a}\\\\nwhile\\\\nfor\\\\nif\\\\nbreak\\\\n${a}\\\\ncontinue\\\\nbreak\\\\nindex += 1\\\\nindex = 1\\\\n`,d.content=`\\\\nproductIdList = [0,1,2,3,4,5,6,7,8,9]\\\\nindex = 0\\\\n${p}(index \u003c 10):\\\\n print(productIdList[index])\\\\n\\\\n if productIdList[index] == 6:\\\\n ${p}\\\\n else:\\\\n ${p}\\\\n`,d.answer={0:0,1:3,2:2},d.tutorial=\\\"\\\\nbreak 是跳離迴圈,continue 是直接跳到下一次的迴圈\\\\n\\\",l.push(d),d={},d.type=r,d.description=\\\"\\\\n\\\\n你正在寫一隻程式幫助學校去幫全校成績進行分級\\\\n\\\\n分級的方式如下:\\\\n90 到 100 是 A 級\\\\n80 到 89 是 B 級\\\\n70 到 79 是 級\\\\n65 到 69 是 D 級\\\\n0 到 64 是 F 級\\\\n\\\\n請試著完成此程式!\\\\n\\\",d.options=`\\\\nif grade \u003c= 90:\\\\nif grade \u003e= 90:\\\\nelif grade \u003e 90:\\\\nelif grade \u003e= 90:\\\\n${a}\\\\nif grade \u003e 80:\\\\nif grade \u003e= 80:\\\\nelif grade \u003e 80:\\\\nelif grade \u003e= 80:\\\\n${a}\\\\nif grade \u003e 70:\\\\nif grade \u003e= 70:\\\\nelif grade \u003e 70:\\\\nelif grade \u003e= 70:\\\\n${a}\\\\nif grade \u003e 65:\\\\nif grade \u003e= 65:\\\\nelif grade \u003e 65:\\\\nelif grade \u003e= 65:\\\\n`,d.content=`\\\\n#字母等級轉換器\\\\n\\\\ngrade = int(input(\\\"請輸入分數\\\"))\\\\n\\\\n${p}\\\\n level = 'A'\\\\n${p}\\\\n level = 'B'\\\\n${p}\\\\n level = 'C'\\\\n${p}\\\\n level = 'D'\\\\nelse:\\\\n level = 'F'\\\\n\\\\nprint(\\\"等級是\\\", level)\\\\n`,d.answer={0:1,1:3,2:3,3:3},l.push(d),d={},d.type=r,d.description=\\\"\\\\n你正在開發一個線上遊戲的Python應用程式。\\\\n\\\\n你正在寫一個遊戲程式,你要創造一個名為 update_life 的函式\\\\n\\\\n函數接收當前生命值 current 和一個數值 value\\\\n函數將值添加到當前生命值\\\\n函數返回新生命值\\\\n\\\\n請完成以上敘述的程式\\\\n\\\",d.options=`\\\\nupdate_life\\\\ndef update_life\\\\nreturn update_life\\\\n${a}\\\\n(current, value):\\\\n():\\\\n(current, value)\\\\n()\\\\n${a}\\\\npass current\\\\nreturn current\\\\nreturn\\\\npass\\\\n`,d.content=`\\\\n${p} ${p}\\\\n current += value\\\\n ${p}\\\\n`,d.answer={0:1,1:0,2:1},l.push(d),d={},d.type=i,d.description=\\\"\\\\n請問如何才能正確的在程式中加入「註解」?\\\\n\\\",d.options=`\\\\n將注釋放在任何一行的 # 符號之後。\\\\n${a}\\\\n將備註放在第一行程式碼之前,用空白行隔開。\\\\n${a}\\\\n將注釋放在最後一行程式碼之後,用空行隔開。\\\\n${a}\\\\n將注釋放在任何一行的括弧內。\\\\n`,d.content=\\\"\\\",d.answer=[0],l.push(d),d={},d.type=s,d.description='\\\\n\\\\n你創建一個函數 power 會數字的次方結果,請問底下關於這隻程式敘述是否正確\\\\n\\\\n01 # power 函數計算指數\\\\n02 # x 是底\\\\n03 # y 是次方\\\\n04 # 返回 x 的 y 次方的值\\\\n05 def power(x , y):\\\\n06 comment = \\\"# 返回值\\\"\\\\n07 return x ** y #x的y次方\\\\n\\\\n',d.options=`\\\\n01 到 04 行在語法檢查時將被忽略。\\\\n${a}\\\\n02 和 03 行中的井字符號(#)非必填。\\\\n${a}\\\\n06 行中的字串將被解釋為注釋。\\\\n${a}\\\\n07 行包含內嵌注釋。\\\\n`,d.content=\\\"\\\",d.answer={0:\\\"yes\\\",1:\\\"no\\\",2:\\\"no\\\",3:\\\"yes\\\"},l.push(d),d={},d.type=i,d.description='\\\\n\\\\nKoding.school 公司正在創建一個健康運動程式。該程式將根據客戶日誌的健走公里數去計算消耗的卡路里。\\\\n\\\\n01 \\\\n02 name = input(\\\"你的名字是什麼?\\\")\\\\n03 return name\\\\n04 \\\\n05 calories = kms * calories_per_km\\\\n06 return calories\\\\n07 distance = int(input(\\\"你這週騎乘了多少公里數\\\"))\\\\n08 burn_rate = 50\\\\n09 biker = get_name()\\\\n10 calories_burned = calc_calories(distance, burn_rate)\\\\n11 print(biker,\\\",你燃燒了大約\\\", calories_burned, \\\"卡路里.\\\")\\\\n\\\\n為了完整完成這隻程式,哪些程式碼片段你將使用在 01 及 04 行中? 。請選擇二個。\\\\n\\\\n',d.options=`\\\\n01 def get_name():\\\\n${a}\\\\n01 def get_name(biker):\\\\n${a}\\\\n01 def get_name(name):\\\\n${a}\\\\n04 def calc_calories():\\\\n${a}\\\\n04 def calc_calories(kms,burn_rate):\\\\n${a}\\\\n04 def calc_calories(kms,calories_per_km):\\\\n`,d.content=\\\"\\\",d.answer=[0,5],l.push(d),d={},d.type=i,d.description=\\\"\\\\n「你是誰」是一部經典電影,但這不是重點\\\\n你應該在 02 行加入什麼程式,能讓電腦根據你輸入的名字跟你打招呼?\\\\n\\\\n01 print(\\\\\\\"你是誰?\\\\\\\")\\\\n02\\\\n03 print('你好' + name)\\\\n\\\\n\\\",d.options=`\\\\ninput(name)\\\\n${a}\\\\nname = input\\\\n${a}\\\\ninput(\\\"name\\\")\\\\n${a}\\\\nname = input()\\\\n`,d.content=\\\"\\\",d.answer=[3],l.push(d),d={},d.type=i,d.description=\\\"\\\\n你需要將資料讀寫到文字檔中。如果檔案不存在,則必須創造它,如果檔案具有內容,則必須覆蓋內容\\\\n你要用到底下哪個方法?\\\\n\\\",d.options=`\\\\nopen(\\\"local_data\\\",\\\"w\\\")\\\\n${a}\\\\nopen(\\\"local_data\\\",\\\"w+\\\")\\\\n${a}\\\\nopen(\\\"local_data\\\",\\\"r\\\")\\\\n${a}\\\\nopen(\\\"local_data\\\",\\\"r+\\\")\\\\n`,d.content=\\\"\\\",d.answer=[0],l.push(d),d={},d.type=i,d.description='\\\\n你正在編寫一個自動化庫存程式。他會紀錄庫存商品的品項與數量,下面顯示的是檔案中 products 的資料範例:\\\\n編號, 價格 , 數量\\\\n10 , 200 , 5\\\\n20 , 100 , 1\\\\n\\\\n你要設計一隻程式這隻程式會:\\\\n檔案的每一行都必須讀取和列印。\\\\n如果遇到空行,則必須忽略。\\\\n在完成所有行的讀取後,必須關閉檔案。\\\\n\\\\n你創建了以下的程式碼。其中包含的行號只是做為參考。\\\\n\\\\n01 products = open(\\\"products.txt\\\",\\\"r\\\")\\\\n02 eof = False\\\\n03 while eof == False:\\\\n04 line = products.readline()\\\\n05 \\\\n06 \\\\n07 print(line.strip())\\\\n08 else:\\\\n09 print(\\\"檔案結束\\\")\\\\n10 eof = True\\\\n11 products.close()\\\\n\\\\n在 05 及 06 行你應該編寫那些程式碼?\\\\n',d.options=`\\\\n05 if line != '\\\\\\\\n':\\\\n06 if line != \\\"\\\":\\\\n${a}\\\\n05 if line != '':\\\\n06 if line != \\\"\\\\\\\\n\\\":\\\\n${a}\\\\n05 if line != '':\\\\n06 if line != \\\"\\\":\\\\n${a}\\\\n05 if line != '\\\\\\\\n':\\\\n06 if line != None:\\\\n`,d.content=\\\"\\\",d.answer=[0],l.push(d),d={},d.type=r,d.description='\\\\n\\\\n你在運動公司工作,你正在創建一個Python程式,可以用來幫助球員紀錄成績\\\\n\\\\n該程式必須允許使用者輸入他們的名字和當前分數。該程式將輸出使用者名和使用者的平均分數。輸出必須符合以下要求:\\\\n\\\\n使用者姓名必須是靠左對齊的。\\\\n如果使用者姓名少於20個字元,則必須在右側添加額外的空間。\\\\n平均分數必須有三個位置在小數點的左邊和一個位置在小數點右邊(XXX.X)。\\\\n\\\\n你要如何完成程式碼?回答時,請在回答區中選擇適當的程式碼片段。\\\\n\\\\n\\\\n========================================\\\\n\\\\nname = input(\\\"你的名字?\\\")\\\\nscore = 0\\\\ncount = 0\\\\nsum = 0\\\\nwhile (score !=1):\\\\n',d.options=`\\\\n%-20?\\\\n%-20d\\\\n%-20f\\\\n%-20s\\\\n${a}\\\\n%1.5?\\\\n%5.1f\\\\n%5.1s\\\\n%1.5f\\\\n`,d.content=`\\\\nname = input(\\\"你的名字是什麼?\\\")\\\\nscore = 0\\\\ncount = 0\\\\nsum = 0\\\\nwhile (score !=1):\\\\n score = int(input(\\\"輸入你的分數:(輸入-1結束程式)\\\"))\\\\n if score == -1:\\\\n break\\\\n sum += score\\\\n count += 1\\\\naverage = sum / count\\\\nprint(\\\"${p},你的平均分數是:${p}\\\"%(name,average))\\\\n\\\\n`,d.answer={0:3,1:1},l.push(d),d={},d.type=o,d.description=\\\"\\\\n你正在編寫一個處理檔案的函數 get_first_line。\\\\n它要傳入一個檔案名稱,如果檔案不存在,則需要確保該函數返回 None。如果該檔案確實存在,則該函數必須返回該檔案裡的第一行的內容。\\\\n\\\\n你編寫以下的程式碼:\\\\n\\\\nimport os\\\\ndef get_first_line(filename)\\\\n\\\\n你應該如何安排這些程式碼片段的順序來完成函數?回答時,請將適合的程式碼片段從程式碼片段清單移動到回答區,並按正確的順序排列。\\\\n\\\",d.options=`\\\\nwith open(filename,'r') as file:\\\\n${a}\\\\nelse:\\\\n${a}\\\\n return file.readline()\\\\n${a}\\\\n return None\\\\n${a}\\\\nif os.path.isfile(filename):\\\\n`,d.content=`\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n`,d.answer={0:4,1:0,2:2,3:1,4:3},l.push(d),d={},d.type=r,d.description=\\\"\\\\nOMG 有機公司需要一個簡單的程式,話務中心將使用該程式輸入新的土豆品種的調查資料\\\\n\\\\n該程式必須接受輸入並返回基於五顆星規模的平均評等。輸出必須四捨五入到小數第二位\\\\n\\\\n請試著完成此程式\\\\n\\\",d.options=`\\\\nprint(\\\"請輸入下一個評等(1-5),完成請輸入-1\\\")\\\\nfloat(input(\\\"請輸入下一個評等(1-5),完成請輸入-1\\\"))\\\\ninput(\\\"請輸入下一個評等(1-5),完成請輸入-1\\\")\\\\ninput\\\"請輸入下一個評等(1-5),完成請輸入-1\\\")\\\\n${a}\\\\noutput(\\\"新土豆的平均星級評等是:\\\"\\\\nconsole.input(\\\"新土豆的平均星級評等是:\\\"\\\\nprintline(\\\"新土豆的平均星級評等是:\\\"\\\\nprint(\\\"新土豆的平均星級評等是:\\\"\\\\n${a}\\\\nformat(average,'.2f'))\\\\nformat(average,'.2d'))\\\\n{average,'.2f'}\\\\nformat.average.{2d}\\\\n`,d.content=`\\\\nsum = count = done = 0\\\\naverage = 0.0\\\\n\\\\nwhile (done != -1):\\\\n rating = ${p}\\\\n\\\\n if rating == -1:\\\\n break\\\\n sum += rating\\\\n count +=1\\\\n\\\\naverage = float(sum / count)\\\\n\\\\n${p} + ${p}\\\\n`,d.answer={0:2,1:3,2:0},l.push(d),d={},d.type=s,d.description=\\\"\\\\n在下列的語法敘述中,如果是正確的就選擇Yes,否則請選擇No。\\\\n\\\",d.options=`\\\\n在 try 語法中可以有一個或多個 except 子句。\\\\n${a}\\\\n在 try 語法中可以有一個沒有 except 子句的 finally 子句。\\\\n${a}\\\\n在 try 語法中可以一個 finally 子句與 except 子句。\\\\n${a}\\\\n在 try 語法中可以有一個或多個 finally 子句。\\\\n`,d.content=\\\"\\\",d.answer={0:\\\"yes\\\",1:\\\"yes\\\",2:\\\"yes\\\",3:\\\"no\\\"},l.push(d),d={},d.type=i,d.description='\\\\n在這個問題中需要你評估帶底線的文字已確定它是否敘述正確。\\\\n\\\\n你編寫一下程式碼:\\\\n\\\\nimport sys\\\\ntry:\\\\n file_in = open(\\\"in.txt\\\",\\\\'r\\\\')\\\\n file_out = open(\\\"out.txt\\\",\\\\'w+\\\\')\\\\nexcept IOError:\\\\n print(\\\\'無法開啟\\\\',file_name)\\\\nelse:\\\\n i = 1\\\\n for line in file_in:\\\\n print(line.rstrip())\\\\n file_out.write(\\\"line \\\" + str(i) + \\\": \\\" + line)\\\\n i = i + 1\\\\n file_in.close()\\\\n file_out.close()\\\\n\\\\nout.txt檔不存在。你執行程式碼。「這個程式碼將執行而不出錯」!!\\\\n\\\\n如果語法正確,請選擇\\\"不需要改變\\\"。如果語法不正確,請選擇語法正確的答案選項\\\\n',d.options=`\\\\n不需要改變。\\\\n${a}\\\\n程式碼執行,但產生邏輯錯誤。\\\\n${a}\\\\n程式碼將產生執行階段錯誤。\\\\n${a}\\\\n程式碼將產生語法錯誤。\\\\n`,d.content=\\\"\\\",d.answer=[3],l.push(d),d={},d.type=i,d.description=\\\"\\\\n\\\\n你正在創建一個函數 read_file 用來讀取資料檔案並且印出檔案中的每一行。\\\\n\\\\n01 import os\\\\n02 def read_file(file):\\\\n03 line = None\\\\n04 if os.path.isfile(file):\\\\n05 data = open(file,'r')\\\\n06 while line != '':\\\\n07 line = data.readline()\\\\n08 print(line)\\\\n\\\\n即便檔案不存在,程式碼也會嘗試讀取這個檔案。\\\\n\\\\n你需要更正程式碼。\\\\n\\\\n哪三行有縮排問題?每個正確的答案都提供了部分的解決方案,請選擇三個。\\\\n\\\",d.options=`\\\\nLine 01\\\\n${a}\\\\nLine 02\\\\n${a}\\\\nLine 03\\\\n${a}\\\\nLine 04\\\\n${a}\\\\nLine 05\\\\n${a}\\\\nLine 06\\\\n${a}\\\\nLine 07\\\\n${a}\\\\nLine 08\\\\n`,d.content=\\\"\\\",d.answer=[5,6,7],l.push(d),d={},d.type=r,d.description=\\\"\\\\n\\\\n你在評估以下程式碼時發現錯誤。其中包含的行號只是做為參考。\\\\n\\\\n01 mylist = [0,1,2,3,4,5,6,7,8,9]\\\\n02 i = 0\\\\n03 while (i \u003c 10)\\\\n04 print(mylist[i])\\\\n05\\\\n06 if mylist(i) = 6\\\\n07 break\\\\n08 else:\\\\n09 i += 1\\\\n\\\\n你需要更正 03 行和 06 行中的程式碼\\\\n\\\\n你要如何更正程式碼?根據程式碼片段中提供的資訊,使用下拉式功能表選擇每個問題的答案選項。\\\\n\\\\n\\\\n\\\",d.options=`\\\\nwhile(i \u003c 10):\\\\nwhile[i \u003c10]\\\\nwhile(i \u003c5):\\\\nwhile[i \u003c5]\\\\n${a}\\\\nif numbers[i] == 6\\\\nif numbers[i] == 6:\\\\nif numbers(i) = 6:\\\\nif numbers(i) != 6\\\\n`,d.content=`\\\\n在 03 行中應該使用哪個程式碼片段\\\\n${p}\\\\n在 06 行中應該使用哪個程式碼片段\\\\n${p}\\\\n`,d.answer={0:0,1:1},l.push(d),d={},d.type=r,d.description='\\\\n\\\\n你編寫了以下的程式碼:\\\\n\\\\nlist_a = [1,2,3,4,5]\\\\nlist_b = [\\\"a\\\",\\\"b\\\",\\\"c\\\",\\\"d\\\",\\\"e\\\"]\\\\nprint(list_a is list_b)\\\\nprint(list_a == list_b)\\\\nlist_a = list_b\\\\nprint(list_a is list_b)\\\\nprint(list_a == list_b)\\\\n\\\\n根據程式碼片段中提供的資訊,使用下拉選單選擇每個問題的答案選項。\\\\n',d.options=`\\\\nTrue\\\\nFalse\\\\n${a}\\\\nTrue\\\\nFalse\\\\n${a}\\\\nTrue\\\\nFalse\\\\n${a}\\\\nTrue\\\\nFalse\\\\n`,d.content=`\\\\n在第一次 print 後會印出什麼? ${p}\\\\n在第二次 print 後會印出什麼? ${p}\\\\n在第三次 print 後會印出什麼? ${p}\\\\n在第四次 print 後會印出什麼? ${p}\\\\n`,d.answer={0:1,1:1,2:0,3:0},l.push(d),d={},d.type=r,d.description=\\\"\\\\n\\\\n橘子蘋果漫畫出借連鎖店,需要一種方法來決定客戶租用漫畫的費用,該費用取決於漫畫歸還的時間。然而,在週四和週日也有特別的費率。\\\\n\\\\n費用結構如下所示:\\\\n\\\\n費用是每晚1.59美元。\\\\n如果漫畫在晚上8點後返還,則客戶將被收取額外一天的費用。\\\\n如果漫畫是在星期天租的,那麼客戶即可享受 30% 的折扣。\\\\n如果漫畫是在星期四租地,那麼客戶即可以享受 50% 的折扣。\\\\n\\\\n你需要撰寫程式碼去滿足這個需求。\\\\n\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n\\\\n注意:每個正確的選項都可獲得一分。\\\\n\\\",d.options=`\\\\n!= \\\"n\\\":\\\\n== \\\"n\\\":\\\\n== \\\"y\\\":\\\\n${a}\\\\n== \\\"Sunday\\\":\\\\n\u003e= \\\"Sunday\\\":\\\\nis \\\"Sunday\\\":\\\\n${a}\\\\n== \\\"Thursday\\\":\\\\n\u003c= \\\"Thursday\\\":\\\\nis \\\"Thursday\\\":\\\\n`,d.content=`\\\\n\\\\nontime = input(\\\"漫畫是在晚上8點前返還的嗎? y 或 n\\\").lower()\\\\n\\\\ndays_rented = int(input(\\\"漫畫出租了幾天?\\\"))\\\\n\\\\nday_rented = input(\\\"漫畫是在星期幾出租?\\\").capitalize()\\\\n\\\\ncost_per_day = 1.59\\\\n\\\\nif ontime ${p}\\\\n days_rented += 1\\\\nif day_rented ${p}\\\\n total = (days_rented * cost_per_day)*0.7\\\\n\\\\nelif day_rented ${p}\\\\n total = (day_rented * cost_per_day)*0.5\\\\n\\\\nelse:\\\\n\\\\n total = days_ranted *cost_per_day\\\\n\\\\nprint(\\\"漫畫的租借費用為:$\\\", total)`,d.answer={0:1,1:0,2:0},l.push(d),d={},d.type=r,d.description=\\\"\\\\n你要撰寫一隻程式用來分析網路上的英文文章,他會根據清單去計算字母的數量\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n\\\\n\\\\n\\\",d.options=`\\\\nword_list in word:\\\\nword in word_list:\\\\nword == word_list:\\\\nword is word_list\\\\n${a}\\\\nword is letter:\\\\nletter is word:\\\\nword in letter:\\\\nletter in word:\\\\n`,d.content=`\\\\n\\\\n#函數接受檔案中的文字清單,\\\\n# 以及要搜索的字母,\\\\n#返回該清單中特定字母的數量。\\\\n\\\\ndef count_letter(letter, word_list):\\\\n count = 0\\\\n for ${p}\\\\n if ${p}\\\\n count += 1\\\\n return count\\\\n\\\\nword_list = []\\\\n#word_list 是由檔案中取得.程式碼中並未顯示.\\\\n\\\\nletter = input(\\\"你想要計算哪個字母的數量\\\")\\\\nletter_count = count_letter(letter , word_list)\\\\nprint(\\\"一共有:\\\",letter_count,\\\"個字母\\\"+letter)\\\\n`,d.answer={0:1,1:3},l.push(d),d={},d.type=r,d.description=\\\"\\\\n你創建以下程式來找出會議室並顯示房間名稱。其中包含的行號只是做為參考。\\\\n\\\\n01 rooms = {1 : 'A Room',2 : 'B Room'}\\\\n02 room = input(\\\\\\\"輸入房間號碼:\\\\\\\")\\\\n03 if not room in rooms:\\\\n04 print('該房間並不存在.')\\\\n05 else:\\\\n06 print(\\\\\\\"房間名稱為\\\\\\\" + rooms[room])\\\\n\\\\n同事們回報說程式有時會產生不正確的結果。\\\\n\\\\n你需要對程式進行故障排除。根據程式碼片段中提供的資訊,使用下拉選單選擇每個問題的答案選項。\\\\n\\\",d.options=`\\\\nbool 與 string\\\\nfloat 與 bool\\\\nint 與 string\\\\nfloat 與 int\\\\n${a}\\\\nbool\\\\nfloat\\\\nint\\\\nstring\\\\n${a}\\\\n語法不正確\\\\n資料類型不匹配\\\\n變數命名錯誤\\\\n`,d.content=`\\\\n在 01 行中有哪兩種資料類型儲存在 rooms 清單中? ${p}\\\\n在 02 行中room的資料類型是什麼? ${p}\\\\n在 03 行中為什麼會在rooms清單中找不到資料? ${p}\\\\n`,d.answer={0:2,1:3,2:1},l.push(d),d={},d.type=r,d.description=\\\"\\\\n\\\\n01 def test(a,b,c,d):\\\\n02 value = a + b * c - d\\\\n03 return value\\\\n\\\\n根據程式碼片段中提供的資訊使用下拉式選單選擇每個問題的答案選項\\\\n\\\",d.options=`\\\\na + b\\\\nb * c\\\\nc - d\\\\n${a}\\\\n加( + )\\\\n減( - )\\\\n${a}\\\\n(a + b) * (c - d)\\\\n(a + (b * c)) - d\\\\na + ((b * c) - d)\\\\n`,d.content=`\\\\n運算式的哪個部分將第一個進行計算? ${p}\\\\n運算式的哪個部分將第二個進行計算? ${p}\\\\n哪個運算式等於題目函數中的運算式? ${p}\\\\n`,d.answer={0:1,1:0,2:1},l.push(d),d={},d.type=i,d.description=\\\"\\\\n\\\\n一個名為 data 的串列包含 200 送出抽獎表單的名單,最後五名為得獎者。你需要取得所有「沒得獎」的名單並寄出「銘謝惠顧」\\\\n\\\\n請選擇兩個作法\\\\n\\\",d.options=`\\\\ndata[:-5]\\\\n${a}\\\\ndata[0:-4]\\\\n${a}\\\\ndata[0:-5]\\\\n${a}\\\\ndata[1:-5]\\\\n${a}\\\\ndata[1:-4]\\\\n`,d.content=\\\"\\\",d.answer=[0,2],l.push(d),d={},d.type=o,d.description=\\\"\\\\n將資料類型與類型運算結果對應。\\\\n\\\\n回答時,請將適合的資料類型拖動到正確的類型運算結果中。每種資料類型可以使用一次,多次,或不使用。\\\\n\\\",d.options=`\\\\nint\\\\n${a}\\\\nfloat\\\\n${a}\\\\nstr\\\\n${a}\\\\nbool\\\\n`,d.content=`\\\\ntype(+1E10) ${p}\\\\ntype(5.0) ${p}\\\\ntype(\\\"True\\\") ${p}\\\\ntype(False) ${p}\\\\n`,d.answer={0:1,1:1,2:2,3:3},l.push(d),d={},d.type=i,d.description=\\\"\\\\n橘子蘋果公司已聘請你成為在程式開發團隊中程式的實習生。\\\\n\\\\n你必須編寫一個腳本來要求使用者提供一個值。即使使用者輸入了小數,該值也必須轉換為整數來進行計算。\\\\n\\\\n你應該使用哪個程式碼片段 ?\\\\n\\\",d.options=`\\\\nvalue = str(input(\\\"輸入值?\\\"))\\\\n${a}\\\\nvalue = input(\\\"輸入值?\\\")\\\\n${a}\\\\nvalue = int(input(\\\"輸入值?\\\"))\\\\n${a}\\\\nvalue = float(input(\\\"輸入值?\\\"))\\\\n`,d.content=\\\"\\\",d.answer=[2],l.push(d),d={},d.type=o,d.description=\\\"\\\\n將資料類型與程式碼片段對應。回答時,請將適當的資料類型從左側的列拖動到右側的程式碼片段。每種資料類型可以使用一次,多次或不使用。\\\\n\\\",d.options=`\\\\nbool\\\\n${a}\\\\nfloat\\\\n${a}\\\\nint\\\\n${a}\\\\nstr\\\\n`,d.content=`\\\\n\\\\nage = 2 ${p}\\\\nminor = False ${p}\\\\nname = \\\"Contoso\\\" ${p}\\\\nweight = 123.5 ${p}\\\\nzip = \\\"81000\\\" ${p}\\\\n`,d.answer={0:2,1:0,2:3,3:1,4:3},l.push(d),d={},d.type=o,d.description=\\\"\\\\n\\\\n程式 a, b 兩個變數值如下:\\\\n\\\\na = 11\\\\nb = 4\\\\n\\\\n請將運算是與結果進行配對\\\\n\\\",d.options=`\\\\nprint(a / b)\\\\n${a}\\\\nprint(a // b)\\\\n${a}\\\\nprint(a % b)\\\\n`,d.content=`\\\\n2 ${p}\\\\n3 ${p}\\\\n2.75 ${p}\\\\n`,d.answer={0:1,1:2,2:0},l.push(d),d={},d.type=r,d.description=\\\"\\\\n你是橘子蘋果的的實習生。你必須製作一個函數為的車輛計算在400公尺跑道上的平均速度。輸出結果必須盡可能精準。\\\\n\\\\n要如何完成程式碼?回答時,請在回答區選擇適當的程式碼片段。\\\\n\\\",d.options=`\\\\nint\\\\nstr\\\\nfloat\\\\n${a}\\\\nint\\\\nstr\\\\nfloat\\\\n`,d.content=`\\\\ndistance = ${p} (input(\\\"請輸入以公尺為單位的行駛距離\\\"))\\\\n\\\\ndistance_kms = distance / 1000 #轉換為公里\\\\n\\\\ntime = ${p}(input(\\\"請輸入以秒為單位的經過時間\\\"))\\\\ntime_hours = time / 3600 #轉換為小時\\\\n\\\\nvelocity = distance_kms / time_hours\\\\nprint(\\\"平均時速是:\\\",velocity,\\\"公里/小時\\\")\\\\n`,d.answer={0:2,1:2},l.push(d),d={},d.type=s,d.description='\\\\n#程式碼片段1\\\\nx1 = \\\"20\\\"\\\\ny1 = 3\\\\na = x1 * y1\\\\n\\\\n#程式碼片段2\\\\nx2 = 6\\\\ny2 = 4\\\\nb = x2 / y2\\\\n\\\\n#程式碼片段3\\\\nx3 = 2.5\\\\ny3 = 1\\\\nc = x3 / y3\\\\n',d.options=`\\\\n執行程式碼片段 1 後,變數 a 的資料類型為str。\\\\n${a}\\\\n執行程式碼片段 2 後,變數 b 的資料類型為float。\\\\n${a}\\\\n執行程式碼片段 3 後,變數 c 的資料類型為int。\\\\n`,d.content=\\\"\\\",d.answer={0:\\\"yes\\\",1:\\\"yes\\\",2:\\\"no\\\"},l.push(d),d={},d.type=o,d.description=\\\"\\\\n程式在執行各種運算中,是有按照一定的優先程度來執行\\\\n按先後順序從頭至尾排列這六類運算的正確順序是什麼? 回答時,請將運算清單中的所有運算移動到回答區,並按正確的順序排列它們。\\\\n\\\",d.options=`\\\\n正數( + )、負數( - )與反位元( not )\\\\n${a}\\\\n括弧\\\\n${a}\\\\n乘法和除法( * , / )\\\\n${a}\\\\n加法和減法( + , - )\\\\n${a}\\\\n指數( ** )\\\\n${a}\\\\n且( and )\\\\n`,d.content=`\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n`,d.answer={0:1,1:4,2:0,3:2,4:3,5:5},l.push(d),d={},d.type=i,d.description=\\\"\\\\na = (3 * ( 1 + 2 ) ** 2 - ( 2 ** 2) * 3 )\\\\nprint(a)\\\\n\\\\n請問執行以上程式最後會印出什麼?\\\\n\\\\n\\\",d.options=`\\\\n3\\\\n${a}\\\\n13\\\\n${a}\\\\n15\\\\n${a}\\\\n69\\\\n`,d.content=\\\"\\\",d.answer=[2],l.push(d),d={},d.type=o,d.description='\\\\n你正在用 Python 程式計算一個數學公式\\\\n公式內容為 b 等於 a 乘以 -1,然後再平方,其中 a 是輸入的值,b 是結果\\\\n\\\\n01 a = eval(input(\\\"請輸入一個數字:\\\"))\\\\n02 b =\\\\n\\\\n你需要確保結果是正確的。如何完成 02 行的程式碼後面的部分\\\\n\\\\n',d.options=`\\\\n-\\\\n${a}\\\\n(\\\\n${a}\\\\n)\\\\n${a}\\\\n**\\\\n${a}\\\\n**2\\\\n${a}\\\\n2\\\\n${a}\\\\na\\\\n`,d.content=`\\\\nb = ${p}${p}${p}${p}${p}\\\\n`,d.answer={0:1,1:0,2:6,3:2,4:4},l.push(d),d={},d.type=i,d.description='\\\\n01 start = input(\\\"你幾歲開始上學?\\\")\\\\n02 end = input(\\\"你今天幾歲?\\\")\\\\n03 \\\\n\\\\n\\\\n你要創造一個程式會計算使用者學齡的時間,你需要完成這個程式。\\\\n你應該在 03 行使用哪個程式碼?\\\\n',d.options=`\\\\nprint(\\\"你已經讀書讀了\\\" + int(end - start) + \\\"年!\\\")\\\\n${a}\\\\nprint(\\\"你已經讀書讀了\\\" + str(end - start) + \\\"年!\\\")\\\\n${a}\\\\nprint(\\\"你已經讀書讀了\\\" + (int(end)-int(start))+\\\"年!\\\")\\\\n${a}\\\\nprint(\\\"你已經讀書讀了\\\" + str(int(end)-int(start))+\\\"年!\\\")\\\\n`,d.content=\\\"\\\",d.answer=[3],l.push(d),d={},d.type=i,d.description=\\\"\\\\n你正在編寫的程式碼用來生成的隨機整數,最小值為5,最大值為10。\\\\n\\\\n你應該使用哪兩種個方法?\\\\n\\\",d.options=`\\\\nrandom.randint(5 , 11)\\\\n${a}\\\\nrandom.randrange(5 , 11 , 1)\\\\n${a}\\\\nrandom.randint(5 , 10)\\\\n${a}\\\\nrandom.randrange(5 , 10 , 1)\\\\n`,d.content=\\\"\\\",d.answer=[1,2],l.push(d),d={},d.type=i,d.description=\\\"\\\\n你正在編寫使用 randrange 函數的應用程式。這個程式必須使用名稱 fancy_randrange 引用該函數。\\\\n\\\\n你需要導入該函數。\\\\n\\\\n你應該使用哪個程式碼片段?\\\\n\\\\n\\\",d.options=`\\\\nimport random.randrange as fancy_randrange\\\\n${a}\\\\nimport randrange from random as fancy_randrange\\\\n${a}\\\\nfrom random.randrange as fancy_randrange\\\\n${a}\\\\nfrom random import randrange as fancy_randrange\\\\n`,d.content=\\\"\\\",d.answer=[3],l.push(d),d={},d.type=i,d.description=\\\"\\\\n你正在創建一個處理數字的函數。該函數具有以下要求:\\\\n\\\\n將浮點數傳遞到函數中\\\\n函數必須取浮點數的絕對值\\\\n整數後的任何小數必須去除\\\\n\\\\n你應該使用哪兩個 Math 函數?每個正確的答案都是解決方案的一部分。選擇兩個。\\\\n\\\",d.options=`\\\\nmath.ceil(x)\\\\n${a}\\\\nmath.floor(x)\\\\n${a}\\\\nmath.fabs(x)\\\\n${a}\\\\nmath.fmod(x)\\\\n${a}\\\\nmath.frexp(x)\\\\n`,d.content=\\\"\\\",d.answer=[0,1],l.push(d),e.exports=l},{\\\"../constants\\\":2}],16:[function(n,e,t){const{OPTIONS:i,SELECT:r,TRUE_OR_FALSE:s,DRAG_AND_DROP:o,OPTION_SPLITER:a,CONTENT_SELECTER:p,EXAM_TYPE_MOCK:c}=n(\\\"../constants\\\"),l=[];l.type=c,l.title=\\\"模擬測驗卷 (2)\\\",l.description=\\\"\\\",q={},q.type=i,q.description=\\\"\\\\n請問執行以下程式會產生什麼錯誤?\\\\n\\\\nimport sys\\\\ntry:\\\\n file_a = open(\\\\\\\"a.txt\\\\\\\", 'r')\\\\n file_b = open(\\\\\\\"b.txt\\\\\\\", 'w+')\\\\nexcept IOError:\\\\n print('HE', file_name)\\\\nelse:\\\\n i = 1\\\\n for line in file_a:\\\\n print(line.rstrip())\\\\n file_b.write(\\\\\\\"line + str(i) + \\\\\\\": + line)\\\\n\\\",q.options=`\\\\n沒有錯誤。\\\\n${a}\\\\n程式碼執行,但產生邏輯錯誤。\\\\n${a}\\\\n程式碼將產生執行階段錯。\\\\n${a}\\\\n程式碼將產生語法錯誤。\\\\n`,q.content=\\\"\\\",q.answer=[3],l.push(q),q={},q.type=i,q.description=\\\"\\\\n\\\\n底下是一個巡邏機器人的移動程式,請問執行此程式會發生什麼事情?\\\\n\\\\n01 import math\\\\n03 power = True\\\\n04 move = 0\\\\n05 while power:\\\\n06 if move == 0:\\\\n07 turnValue = math.pi / move\\\\n08 move += 5\\\\n09 else:\\\\n10 turnValue = 0\\\\n11 move = 0\\\\n在程式碼中存在哪個錯誤?\\\\n\\\",q.options=`\\\\n04 行導致執行階段錯誤,因為運算式不完整。\\\\n${a}\\\\n07 行有語法錯誤因為+=是無效語法。\\\\n${a}\\\\n04 行有語法去錯誤,因為它應該讀取 power\\\\n${a}\\\\n06 行因為運算時除以零引起的執行階段錯誤。\\\\n`,q.content=\\\"\\\",q.answer=[3],l.push(q),q={},q.type=r,q.description='\\\\n橘子蘋果公司想要用程式去計算五月份的雜項支出 payment 的總金額和平均金額\\\\n請問此程式寫錯了請你能幫它修復到正確\\\\n\\\\n已經宣告了下列變數:\\\\n\\\\npayment = [15000, 120000, 35000, 45000]\\\\ncount = 0\\\\nsum = 0\\\\n\\\\n在以下的程式碼有二個錯誤:\\\\n\\\\nfor index in range (0, len(payment) - 1)):\\\\n count += 1\\\\n sum += payment[index]\\\\naverage = sum // count\\\\nprint(\\\"總支出:\\\", sum)\\\\nprint(\\\"平均支出:\\\", average)\\\\n\\\\n你應使用哪些程式碼來修復錯誤?回答時,請在回答區中選擇適當的程式碼片段。\\\\n\\\\n\\\\n',q.options=`\\\\n(size(payment)):\\\\n(size(payment) - 1):\\\\n(len(payment) + 1):\\\\n(len(payment)):\\\\n${a}\\\\nsum/count\\\\nsum**count\\\\nsum*count\\\\n`,q.content=`\\\\nfor index in range ${p}\\\\n count += 1\\\\n sum += payment[index]\\\\naverage = ${p}\\\\nprint(\\\"總支出:\\\", sum)\\\\nprint(\\\"平均支出:\\\", average)\\\\n`,q.answer={0:3,1:0},l.push(q),q={},q.type=r,q.description=\\\"\\\\n此程式會讀取使用者輸入數字,如果輸入的內容不是數字的,就會重新讀取要求使用者輸入\\\\n請你試著完成此程式的兩個片段並完成它\\\\n\\\",q.options=`\\\\ntry:\\\\nelse:\\\\nexcept:\\\\nraise:\\\\nfinally:\\\\n${a}\\\\ntry:\\\\nelse:\\\\nexcept:\\\\nraise:\\\\nfinally:\\\\n`,q.content=`\\\\nwhile True:\\\\n ${p}\\\\n x = int(input('請輸入一個數字:'))\\\\n break\\\\n ${p} ValueError:\\\\n print('這不是一個有效的數字,再試一次...')\\\\n`,q.answer={0:0,1:2},l.push(q),q={},q.type=i,q.description=\\\"\\\\n01 def read_file(file):\\\\n02 line = None\\\\n03 if os.path.isfile(file):\\\\n04 data = open (file, 'r')\\\\n05 for line in data:\\\\n06 print (line)\\\\n\\\\n當你執行此程式時,你會收到 03 行上的錯誤\\\\n請問導致錯誤的原因是什麼?\\\\n\\\",q.options=`\\\\n你需要導入 os 函數庫\\\\n${a}\\\\npath 物件中不存在 isfile 方法\\\\n${a}\\\\npath 方法並不存在 os 物件中\\\\n${a}\\\\nisfile 方法不接受一個參數\\\\n`,q.content=\\\"\\\",q.answer=[0],l.push(q),q={},q.type=i,q.description=\\\"\\\\n你要產生一個隨機數字,此隨機數字是 5 的倍數,範圍在 5 ~ 100 之間。\\\\n底下有兩個程式碼片段能做到此目標的解法!\\\\n\\\",q.options=`\\\\nfrom random import randint\\\\nprint(randint (0, 20) * 5) \\\\n${a}\\\\nfrom random import randint\\\\nprint(randint (1, 20) * 5)\\\\n${a}\\\\nfrom random import randrange\\\\nprint (randrange(5, 105, 5))\\\\n${a}\\\\nfrom random import randrange\\\\nprint (randrange(0, 100, 5))\\\\n`,q.content=\\\"\\\",q.answer=[1,2],l.push(q),q={},q.type=i,q.description=\\\"\\\\n你要產生一個 0 ~ 1 之間的隨機小數,你應該使用哪個語法?\\\\n\\\",q.options=`\\\\nrandom.randrange(0.0, 1.0)\\\\n${a}\\\\nrandom.randrange()\\\\n${a}\\\\nrandom.randint(0, 1)\\\\n${a}\\\\nrandom.random()\\\\n`,q.content=\\\"\\\",q.answer=[3],l.push(q),q={},q.type=r,q.description=\\\"\\\\n你在設計一款遊戲中的一個函式 update_score ,它會接收兩個數字,分別是玩家分數 和 得分數\\\\n它會將得分數加到玩家分數,並回傳新的分數。\\\\n請你選擇適合的程式碼片段完成此程式。\\\\n\\\",q.options=`\\\\nupdate_score\\\\ndef update_score\\\\nreturn update_score\\\\n${a}\\\\n(current, value):\\\\n():\\\\n(current, value)\\\\n()\\\\n${a}\\\\npass current\\\\nreturn current\\\\nreturn\\\\npass\\\\n`,q.content=`\\\\n${p} ${p}\\\\n current += value\\\\n ${p}\\\\n`,q.answer={0:1,1:0,2:1},l.push(q),q={},q.type=s,q.description=\\\"\\\\n\\\\n你在設計一款遊戲中的一個計算玩家得分的函式 increment_score ,它會接收三個參數\\\\n分別是玩家當前分數 score 、玩家得分 points 以及是否分數獎勵 bonus\\\\n\\\\n如果沒有為變數 points 指定數值,則 points 預設為 1\\\\n如果 bonus 是 True ,那麼 points 必須翻倍\\\\n\\\\n01 def increment_score(score, bonus, points):\\\\n02 if bonus == True:\\\\n03 points = points * 2\\\\n04 score = score + points\\\\n05 return score\\\\n06 points = 5\\\\n07 score = 10\\\\n08 new_score = increment_score(score, True, points)\\\\n\\\\n請判斷關於此程式的描述是否正確\\\\n\\\",q.options=`\\\\n為了符合要求,必須將01行更改為以下内容:\\\\ndef increment_score(score, bonus, points = 1):\\\\n${a}\\\\n一旦使用預設值定義了任何參數,其右側的任何參數也必須使用默認值進行定義。\\\\n${a}\\\\n假如 01 行未更改 如果只用兩個參數呼叫函數則第三個參數的值將為 None.\\\\n${a}\\\\n03 行會修改宣告在06行中變數 points 的值。\\\\n`,q.content=\\\"\\\",q.answer={0:\\\"yes\\\",1:\\\"yes\\\",2:\\\"yes\\\",3:\\\"no\\\"},l.push(q),q={},q.type=s,q.description='\\\\n01 # calc_power 計算指數\\\\n02 # x 是底\\\\n03 # y 是次方\\\\n04 # 返回 x 的y次方的值\\\\n05 def calc_power(x, y):\\\\n06 comment = \\\"#返回值\\\"\\\\n07 return x ** y # x的y次方\\\\n\\\\n請判斷關於此程式的敘述是否正確\\\\n',q.options=`\\\\n01到04行在語法檢查時將被忽略。\\\\n${a}\\\\n02和03行中的井字符號(#)非必填。\\\\n${a}\\\\n06行中的字串將被解釋為注釋。\\\\n`,q.content=\\\"\\\",q.answer={0:\\\"yes\\\",1:\\\"no\\\",2:\\\"no\\\"},l.push(q),q={},q.type=i,q.description=\\\"\\\\n你要幫 get_balance 函式加上註解,請問哪個語法是正確的?\\\\n\\\",q.options=`\\\\n'返回帳戶餘額\\\\ndef get_balance():\\\\n return balance\\\\n${a}\\\\n//返回帳戶餘額\\\\ndef get_balance():\\\\n return balance\\\\n${a}\\\\ndef get_balance():\\\\n #返回帳戶餘額\\\\n return balance\\\\n${a}\\\\ndef get_balance():\\\\n /*返回帳戶餘額*/\\\\n return balance\\\\n`,q.content=\\\"\\\",q.answer=[2],l.push(q),q={},q.type=r,q.description=\\\"\\\\n01 def test(a, b, c, d):\\\\n02 value = a + b * c -d\\\\n03 return value\\\\n\\\",q.options=`\\\\na + b\\\\na * c\\\\nc - d\\\\n${a}\\\\n加(+)\\\\n減(-)\\\\n${a}\\\\n(a + b) * (c - d)\\\\n(a + (b * c)) - d\\\\na + ((b * c) - d)\\\\n`,q.content=`\\\\n運算式的哪個部份將第一個進行計算? ${p}\\\\n運算式的哪個部份將第二個進行計算? ${p}\\\\n哪個運算式等於題目函數中的運算式? ${p}\\\\n`,q.answer={0:1,1:0,2:1},l.push(q),q={},q.type=i,q.description=\\\"\\\\nmy_list 串列中有 200 筆的資料\\\\n你要分割這個串列,從第二筆資料開始直到最後,每間隔 2 個就切割出來 \\\\n你應該使用哪個程式做到這件事?\\\\n\\\",q.options=`\\\\nmy_list[::2]\\\\n${a}\\\\nmy_list[2:2]\\\\n${a}\\\\nmy_list[1:2]\\\\n${a}\\\\nmy_list[1::2]\\\\n`,q.content=\\\"\\\",q.answer=[3],l.push(q),q={},q.type=r,q.description='\\\\n01 def checkType (value):\\\\n02 dataType = type(value)\\\\n03 return dataType\\\\n04 print(checkType(True))\\\\n05 print(checkType(1.0))\\\\n06 printcheckType(1))\\\\n07 print(checkType (\\\"True\\\"))\\\\n\\\\n根據程式碼片段中提供的資訊,使用下拉式選單選擇擇每個問題的答案選項。\\\\n',q.options=`\\\\n\u003cclass bool'\u003e\\\\n\u003cclass'float'\u003e\\\\n\u003cclass'int\u003e\\\\n\u003cclass'str'\u003e\\\\n${a}\\\\n\u003cclass'bool'\u003e\\\\n\u003cclass'float'\u003e\\\\n\u003cclass'int'\u003e\\\\n\u003cclass'str'\u003e\\\\n${a}\\\\n\u003cclass'bool'\u003e\\\\n\u003cclass'float'\u003e\\\\n\u003cclass'int'\u003e\\\\n\u003cclass'str'\u003e\\\\n${a}\\\\n\u003cclass'bool'\u003e\\\\n\u003cclass'float'\u003e\\\\n\u003cclass'int'\u003e\\\\n\u003cclass'str'\u003e\\\\n`,q.content=`\\\\n在04行會印出什麼結果? ${p}\\\\n在05行會印出什麼結果? ${p}\\\\n在06行會印出什麼結果? ${p}\\\\n在07行會印出什麼結果? ${p}\\\\n`,q.answer={0:0,1:1,2:2,3:3},l.push(q),q={},q.type=i,q.description=\\\"\\\\ntotal_deposits 是每天的總餘額,number_of_customers 是每天的客戶數量\\\\n你要去計算平均餘額,並去除小數的部分。\\\\n\\\\n請選擇兩個程式碼選項能做到這件事情\\\\n\\\",q.options=`\\\\naverage_balance = int(total_deposits / number_of_customers)\\\\n${a}\\\\naverage_balance = total_deposits ** number_of_customers\\\\n${a}\\\\naverage_balance = total_deposits // number_of_customers\\\\n${a}\\\\naverage_balance = float(total_deposits // number_of_customers)\\\\n`,q.content=\\\"\\\",q.answer=[0,2],l.push(q),q={},q.type=r,q.description='\\\\na = \\\"hello\\\"\\\\nprint (a)\\\\nb = a\\\\na += \\\"world\\\"\\\\nprint (a)\\\\nprint (b)\\\\n',q.options=`\\\\nhello\\\\nhelloworld\\\\nworld\\\\n${a}\\\\nhello\\\\nhelloworld\\\\nworld\\\\n${a}\\\\nhello\\\\nhelloworld\\\\nworld\\\\n`,q.content=`\\\\n在第一次 print 後會顯示什麼? ${p}\\\\n在第二次 print 後會顯示什麼? ${p}\\\\n在第三次 print 後會顯示什麼? ${p}\\\\n`,q.answer={0:0,1:1,2:0},l.push(q),q={},q.type=o,q.description=\\\"\\\\n計算每個運算式並指出正確的結果。回答時,將適當的結果從左側的列拖到右側的運算式中。\\\\n\\\",q.options=`\\\\nTrue\\\\n${a}\\\\nFalse\\\\n${a}\\\\n5\\\\n${a}\\\\nNone\\\\n`,q.content=`\\\\nO or 5 ${p}\\\\nbool(0) ${p}\\\\nNone is None ${p}\\\\n-5 \u003c 0 \u003c 5 ${p}\\\\n`,q.answer={0:2,1:1,2:0,3:0},l.push(q),q={},q.type=i,q.description=\\\"\\\\n你編寫了以下的程式碼:\\\\n\\\\nlist_1 = [1, 2]\\\\nlist 2 = [3, 4]\\\\nlist_3 = list_1 + list_2\\\\nlist_4 = list_3 * 3\\\\nprint(list_4)\\\\n\\\\n執行程式碼。最後的輸出的值是什麼?\\\\n\\\",q.options=`\\\\n[[1, 2], [3, 4], [1, 2], [3, 4], [1, 2], [3, 4]]\\\\n${a}\\\\n[[1, 2, 3, 4], [1, 2, 3, 4], [1, 2, 3, 4]]\\\\n${a}\\\\n[1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4]\\\\n${a}\\\\n[3, 6, 9, 12]\\\\n`,q.content=\\\"\\\",q.answer=[2],l.push(q),q={},q.type=i,q.description=\\\"\\\\n你執行以下的程式碼:\\\\n\\\\nnumList = [0, 1, 2, 3, 4]\\\\nprint (5 in numList)\\\\n\\\\n什麼是會輸出列印的内容?\\\\n\\\",q.options=`\\\\n4\\\\n${a}\\\\n5\\\\n${a}\\\\nFalse\\\\n${a}\\\\nTrue\\\\n`,q.content=\\\"\\\",q.answer=[2],l.push(q),q={},q.type=i,q.description=\\\"\\\\n你正在橘子蘋果電商公司工作,你寫了一個程式 get_discount\\\\n此函式會判斷使用者是否是未成年 minor 或老年 senior,如果是使用者就會獲得 10% 折扣\\\\n\\\\n01 def get_discount (minor, senior):\\\\n02 discount = 0.1\\\\n03\\\\n04 discount = 0\\\\n05 return discount\\\\n\\\\n你必須完程這個程式碼。在 03 行中你將加加入什麼程式碼?\\\\n\\\",q.options=`\\\\nif (not minor) or senior:\\\\n${a}\\\\nif (not minor) and senior:\\\\n${a}\\\\nif not (minor and senior):\\\\n${a}\\\\nif not (minor or senior):\\\\n`,q.content=\\\"\\\",q.answer=[3],l.push(q),q={},q.type=o,q.description=\\\"\\\\n請判斷 a, b, c, d, e 變數裡的資料型態\\\\n\\\",q.options=`\\\\nbool\\\\n${a}\\\\nfloat\\\\n${a}\\\\nint\\\\n${a}\\\\nstr\\\\n`,q.content=`\\\\n${p} a = 2\\\\n${p} b = False\\\\n${p} c = \\\"Hello\\\"\\\\n${p} d = 123.45\\\\n${p} e = \\\"67890\\\"\\\\n`,q.answer={0:2,1:0,2:3,3:1,4:3},l.push(q),q={},q.type=r,q.description='\\\\n\\\\n你寫了一隻程式,會詢問使用者出生年份和當前年份,然後計算出使用者出生的年份。\\\\n\\\\n01 age = input(\\\"請輸入你的年龄:\\\")\\\\n02 year input(\\\"輸入四位数的年份:\\\")\\\\n03 born = eval(year) - eval(age)\\\\n04 message = \\\"你出生在” + str(born)\\\\n05 print(message)\\\\n\\\\n你需要確保程式使用適當的資料類型。\\\\n哪些資料類型被使用了?根據程式碼片段中提供的資訊,使用下拉式選單選擇每個問題的答案選項。\\\\n',q.options=`\\\\nint\\\\nstr\\\\nfloat\\\\nbool\\\\n${a}\\\\nint\\\\nstr\\\\nfloat\\\\nbool\\\\n${a}\\\\nint\\\\nstr\\\\nfloat\\\\nbool\\\\n`,q.content=`\\\\n在01行中age的資料類型是? ${p}\\\\n在03行中born的資料類型是? ${p}\\\\n在04行中message的資料類型是? ${p}\\\\n`,q.answer={0:1,1:0,2:1},l.push(q),q={},q.type=s,q.description='\\\\n你正在創建一個Python程式來比較數字。\\\\n\\\\n\\\\n01 num1 = eval(input(\\\"請輸入第一個數字:\\\"))\\\\n02 num2 = eval(input(\\\"請輸入第二個數字:\\\"))\\\\n03 if numl1 == num2:\\\\n04 print(\\\"這二個數字是相等的,\\\")\\\\n05 if num1 \u003c= num2:\\\\n06 print(\\\"數字1小於數字2.\\\")\\\\n07 if num1 \u003e num2:\\\\n08 print(\\\"數字1 大於 數字2.\\\")\\\\n09 if num2 = numl:\\\\n10 print(\\\"這二個數字是相同的,\\\")\\\\n\\\\n你需要確保比較的結果是準確的。\\\\n\\\\n針對下列每個敘述,如果正確的就選擇Yes,否則請選擇 No。\\\\n',q.options=`\\\\n在04行的語法,只有二個數字的值是相等時才會列印出來。\\\\n${a}\\\\n在06行的語法,只有 num1 小於num2時才會列印出來。\\\\n${a}\\\\n在08行的語法,只有num1大於 num2時才會列印出來。\\\\n${a}\\\\n09行的語法是不正確的比較。\\\\n`,q.content=\\\"\\\",q.answer={0:\\\"yes\\\",1:\\\"no\\\",2:\\\"yes\\\",3:\\\"yes\\\"},l.push(q),q={},q.type=i,q.description='\\\\n請問執行以下程式會印出什麼?\\\\n\\\\nx = 4\\\\nwhile x \u003e= 1:\\\\n if x % 4 == 0:\\\\n print(\\\"A\\\")\\\\n elif x - 2 \u003c 0:\\\\n print(\\\"B\\\")\\\\n elif x / 3 == 0:\\\\n print(\\\"C\\\")\\\\n else:\\\\n print(\\\"D\\\")\\\\n x = x - 1\\\\n',q.options=`\\\\nDACB\\\\n${a}\\\\nACDB\\\\n${a}\\\\nADDB\\\\n${a}\\\\nDCAB\\\\n`,q.content=\\\"\\\",q.answer=[2],l.push(q),q={},q.type=r,q.description=\\\"\\\\n你正在編寫一個函數來執行安全的除法。\\\\n你需要確保將分母和分子傳遞給函數,而且分母不是零。\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n\\\",q.options=`\\\\nif numerator is None or denominator is None:\\\\nif numerator is None and denominator is None:\\\\nif numerator = None or denominator = None:\\\\nif numerator = None and denominator = None:\\\\n${a}\\\\nelif denoiinator == 0:\\\\nelif denominator = 0:\\\\nelif denominator != 0:\\\\nelif denominator in 0:\\\\n`,q.content=`\\\\ndef safe_divide(numerator, denominator):\\\\n ${p}\\\\n print(\\\"缺少所需的值.\\\")\\\\n ${p}\\\\n print(\\\"分母為0.\\\")\\\\n else:\\\\n return numerator / denominator\\\\n`,q.answer={0:0,1:0},l.push(q),q={},q.type=o,q.description='\\\\n你有以下串列結構\\\\na_to_z = \\\"abcdefghijklmnopqrstuvwxyz\\\"\\\\n\\\\n請將底下不同的串列切割去對應的正確的結果\\\\n',q.options=`\\\\nzwtąnkheb\\\\n${a}\\\\npmjg\\\\n${a}\\\\ndefghijklmno\\\\n${a}\\\\nponmlkjihgfe\\\\n${a}\\\\ndefghijklmnop\\\\n${a}\\\\ndgjm\\\\n${a}\\\\nolif\\\\n${a}\\\\n\\\"\\\"\\\\n`,q.content=`\\\\na_to_z[3:15] ${p}\\\\na_to_z[3:15:3] ${p}\\\\na_to_z[3:15:-3] ${p}\\\\na_to_z[15:3:-3] ${p}\\\\na_to_z[15:3] ${p}\\\\na_to_z[::-3] ${p}\\\\n`,q.answer={0:2,1:5,2:7,3:1,4:3,5:7},l.push(q),q={},q.type=r,q.description=\\\"\\\\nreverse_string 函式會將輸入的字串翻轉\\\\n請試著完成這個函式的功能!\\\\n\\\",q.options=`\\\\nstring:\\\\nlen(string):\\\\nrange(0,len(string), -1):\\\\nrange(len(string) - 1, -1, -1):\\\\n${a}\\\\nstring[index-1]\\\\nstring[len(forward_string) - 1]\\\\nstring[len(backward_name) - len(forward_string)]\\\\nstring[index]\\\\n`,q.content=`\\\\n# 函數會反轉字串中的字元.\\\\n# 以相反的順序返回新字串,\\\\ndef reverse_string(string):\\\\n forward_string = ''\\\\n for index in ${p}\\\\n forward_string += ${p}\\\\n return forward_string\\\\n\\\\n`,q.answer={0:3,1:3},l.push(q),q={},q.type=o,q.description=\\\"\\\\n如果在清單中找到該字串,則該函數必須須列印一則消息,指示已找到該字电,然後停止逐一查看清單。\\\\n* 該函數接受個清單和一個字串作為參數。\\\\n* 該函數必須在清單中搜索該字串。\\\\n* 如果在清單中找到該字串,則該函數必須列印一則消息,指示已找到該字串,然後停止逐一查看清單。\\\\n* 如果找不到該字串,則該函數必須列印一則消息,指示在清單中找不到該字串。\\\\n\\\\n如果找不到該字串,則該函數必須列印一則消息,指示在清單中找不到該字串。\\\\n\\\\n你要設計一個函式 search 他會接收兩個參數,item 是一個裝了字串資料的串列、term 是要搜尋的字串\\\\n該函數會透過迴圈從串列中去搜尋該字串,\\\\n如果找到該字串就印出訊息表示找到,然後停止搜尋,如果找不到,就要印出訊息表示找不到。\\\\n\\\\n\\\",q.options=`\\\\ndef search(items, term):\\\\n${a}\\\\nfor i in range (len(items)):\\\\n${a}\\\\n if items[i] == term:\\\\n print(\\\"{0} .\\\". format (term))\\\\n${a}\\\\n else:\\\\n print (\\\"{0} E .\\\".format (term))\\\\n${a}\\\\n break\\\\n`,q.content=`\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n${p}\\\\n`,q.answer={0:0,1:1,2:2,3:4,4:3},l.push(q),q={},q.type=r,q.description=\\\"\\\\n請設計一個程式會印出 2 - 12 的乘法表\\\\n\\\",q.options=`\\\\nfor col in range(1):\\\\nfor col in range(2,13):\\\\nfor col in range(2,12,1):\\\\nfor col in range(12):\\\\n${a}\\\\nfor row in range(13):\\\\nfor row in range(2,12,1):\\\\nfor row in range(2,13):\\\\nfor row in range(12):\\\\n`,q.content=`\\\\n# 顯示 2 - 12 乘法表\\\\ndef times_tables():\\\\n ${p}\\\\n ${p}\\\\n print(str(row) + '*' + str(col) + '=' + row*col)\\\\n# main\\\\ntimes_tables()\\\\n`,q.answer={0:1,1:2},l.push(q),q={},q.type=r,q.description=\\\"\\\\n橘子蘋果公司今年决定給所有不超過10萬的員工獎金。下面的公式適用於每個員工基於其基本工資和單位獎金:\\\\n\\\\n新工資 = 目前工資x 130% + $2000 獎金\\\\n\\\\n您編寫程式碼將員工工資讀入名為 salary_list 的串列,並完成適用於每個合格員工增加工資的程式碼。\\\\n\\\",q.options=`\\\\nfor index in range(len(salary_list) + 1):\\\\nfor index in range(len(salary_list) - 1):\\\\nfor index in range(len(salary_list)):\\\\nfor index in salary_list:\\\\n${a}\\\\nexit()\\\\ncontinue\\\\nbreak\\\\nend\\\\n`,q.content=`\\\\n${p}\\\\n if salary_list[index] \u003e= 100000:\\\\n ${p}\\\\n salary_list[index] = (salary_list[index] * 1.3) + 2000\\\\n`,q.answer={0:2,1:1},l.push(q),q={},q.type=r,q.description=\\\"\\\\n你在橘子蘋果電影院工作,你寫了一個使用程式計算電影門票的價格。入場費根據以下規則計算:\\\\n* 任何 5 歳以下的人 = 免費入場\\\\n* 任何 5 歲或以上的在學學生 = 10 元\\\\n* 任何 5 到 17 歲目沒有就學的人 = 20 元\\\\n* 任何 17 歳以上目沒有就學的人 = 50 元\\\\n\\\",q.options=`\\\\nif age \u003e= 5 and school == True:\\\\nif age \u003e= 5 and age \u003c=17:\\\\nif age \u003e= 5 and school == False:\\\\n${a}\\\\nelif age \u003e= 5 and school == False:\\\\nelse age \u003e= 5 and school == False:\\\\nelif age \u003e= 5 and school == True:\\\\n${a}\\\\nif age \u003e= 5 and school == True:\\\\nif age \u003e= and school == False:\\\\nif age \u003c= 17:\\\\n`,q.content=`\\\\ndef admission_fee(age, school):\\\\n price = 0\\\\n ${p}\\\\n price = 10\\\\n ${p}\\\\n ${p}\\\\n price = 20\\\\n else:\\\\n price = 50\\\\n return price\\\\n`,q.answer={0:0,1:0,2:2},l.push(q),q={},q.type=r,q.description=\\\"\\\\n請選擇正確的程式碼片段,讓程式的結果是正確的\\\\n\\\",q.options=`\\\\nif numList == alphalist:\\\\nif numList == alphalist\\\\nelse:\\\\nelse\\\\n${a}\\\\nif numList == alphalist:\\\\nif numList == alphalist\\\\nelse:\\\\nelse\\\\n`,q.content=`\\\\nnumList = [1, 2, 3, 4, 5]\\\\nalphalist = [\\\"a\\\", \\\"b\\\", \\\"c\\\", \\\"d\\\", \\\"e\\\"]\\\\n${p}\\\\n print(\\\"numList 中的值等於 alphalist\\\")\\\\n${p}\\\\n print(\\\"numList 中的值不等於 alphalist\\\")\\\\n`,q.answer={0:0,1:2},l.push(q),q={},q.type=r,q.description=\\\"\\\\n此程式會要求使用者輸入一個數字,並判斷該數字是 1 位數, 2 位數還是 2 位數以上。\\\\n\\\",q.options=`\\\\nif num \u003e -10 and num \u003c 10:\\\\nif num \u003e -100 and num \u003c 100:\\\\n${a}\\\\nif num \u003e -100 and num \u003c 100:\\\\nelif num \u003e -100 and num \u003c 100:\\\\nif num \u003e -10 and num \u003c 10:\\\\nelif num \u003e -10 and num \u003c10:\\\\n${a}\\\\nelse:\\\\nelif:\\\\n`,q.content=`\\\\nnum = int(input (\\\"翰入一個數值:\\\"))\\\\ndigits = \\\"0\\\"\\\\n\\\\n${p}\\\\n digits = \\\"1\\\"\\\\n${p}\\\\n digits = \\\"2\\\"\\\\n${p}\\\\n digits = \\\"\u003e2\\\"\\\\n${p}\\\\nprint (digits + \\\"位數。\\\")\\\\n`,q.answer={0:0,1:1,2:0},l.push(q),q={},q.type=o,q.description='\\\\n\\\\n請完成底下的猜數字遊戲:\\\\n\\\\n01 from random import randint\\\\n02 target = randint (1, 10)\\\\n03 chance = 1\\\\n04 print(\\\"猜一個從1到10的整數,你將有3機會,\\\")\\\\n05 \\\\n06 guess = int(input(\\\"猜一個整數:\\\"))\\\\n07 if guess \u003e target:\\\\n08 print(\\\"猜的數字太高了\\\")\\\\n09 elif guess \u003c target:\\\\n10 print(\\\"猜的數字太低了\\\")\\\\n11 else:\\\\n12 print(\\\"猜對了!\\\")\\\\n13\\\\n14\\\\n',q.options=`\\\\nwhile chance \u003c= 3:\\\\n${a}\\\\nwhile chance \u003c 3:\\\\n${a}\\\\n break\\\\n${a}\\\\n pass\\\\n${a}\\\\n chance += 1\\\\n${a}\\\\nwhile chance \u003c 3\\\\n${a}\\\\n chance = 2\\\\n`,q.content=`\\\\n在05行你要使用哪個程式碼片段? ${p}\\\\n在13行你要使用哪個程式碼片段? ${p}\\\\n在14行你要使用哪個程式碼片段? ${p}\\\\n`,q.answer={0:0,1:2,2:4},l.push(q),q={},q.type=o,q.description=\\\"\\\\n你正在編寫一個函數以讀取資料檔案並將結果列印為格式化表格。\\\\n資料檔案中包含有關水果的資訊。每個記錄都包含水果的名稱、重呈和價格。\\\\n你需要列印資料,其看起來像下面的範例:\\\\n\\\\nOranges 5.6 1.33\\\\nApples 2.0 0.54\\\\nGrapes 10.2 10.96\\\\n\\\\n具體地說,列印輸出必須符合以下要求:\\\\n* 水果名稱必須印在10個空格範圍内立並靠左對齊。\\\\n* 重量必須印在5個腔格範圍内並靠右對齊,小數點後最多一個數位。\\\\n* 價格必須印在7個空格範圍内並右對濟, 小數點後最多兩位數。\\\\n\\\\n01 def print_table (file):\\\\n02 data = open (file, 'r')\\\\n03 for record in data:\\\\n04 fields = record.split(\\\\\\\",\\\\\\\")\\\\n05\\\\n\\\\n請拖移程式碼片段去完成 05 行的程式碼並完成功能。\\\\n\\\",q.options=`\\\\nprint (\\\"\\\\n${a}\\\\n{10:0}\\\\n${a}\\\\n{5:1f}\\\\n${a}\\\\n{7:2f}\\\\n${a}\\\\n{2:7.2f}\\\\n${a}\\\\n{1:5.1f}\\\\n${a}\\\\n{0:10}\\\\n`,q.content=`\\\\n${p}${p}${p}${p}\\\". format(fields [0], eval (fields[1]), eval(fields[2])))\\\\n`,q.answer={0:0,1:6,2:5,3:4},l.push(q),q={},q.type=i,q.description=\\\"\\\\n你編寫了以下的程式碼:\\\\nimport datetime\\\\n\\\\nd = datetime.datetime(2020, 4, 7)\\\\nprint('{:%B-%d-%y}').format(d))\\\\nnum = 1234567.890\\\\nprint('{:,.4f}'.format(num))\\\\n\\\",q.options=`\\\\nApril-07-17\\\\n1,234,567.8900\\\\n${a}\\\\n04-07-2020\\\\n1,234,567.8900\\\\n${a}\\\\n04-07-17\\\\n1234567.89\\\\n${a}\\\\n2020-April-17\\\\n1,234,567.890\\\\n`,q.content=\\\"\\\",q.answer=[0],l.push(q),q={},q.type=i,q.description='\\\\ninventory.txt 是交易紀錄的檔案,該檔案包含前一天的銷售額,包括物料編號、價格和數量。\\\\n下面顯示的是檔案中的資料範例:\\\\n\\\\n10, 200, 5\\\\n20, 100, 1\\\\n\\\\n你要完成一隻程式碼必須符合以下的需求\\\\n* 檔案的每行都必須讀取和列印\\\\n* 如果遇到空行,則必須忽略\\\\n* 在完成所有行的讀取後,必須關閉檔案\\\\n\\\\n01 inventory = open(\\\"inventory.txt\\\", \\\\'r\\\\')\\\\n02 eof = False\\\\n03 while eof == False:\\\\n04 line = inventory.readline()\\\\n05\\\\n06\\\\n07 print(line.strip())\\\\n08 else:\\\\n09 print(\\\"檔案結束\\\")\\\\n10 eof = True\\\\n11 inventory.close()\\\\n\\\\n在 05 及 06 行你應該加入哪些程式碼?\\\\n',q.options=` \\\\n05 if line != '\\\\\\\\n':\\\\n06 if line != \\\"\\\":\\\\n${a}\\\\n05 if line != '':\\\\n06 if line != \\\"\\\":\\\\n${a}\\\\n05 if line != '':\\\\n06 if line != \\\"\\\\\\\\n\\\":\\\\n${a}\\\\n05 if line != '\\\\\\\\n':\\\\n06 if line != None:\\\\n`,q.content=\\\"\\\",q.answer=[2],l.push(q),q={},q.type=i,q.description='\\\\n你正在創建一個電子商務腳本,它接受來自使用者的輸入, 並以逗號分隔的格式輸出資料。\\\\n\\\\n你可以編寫以下程式碼來接受輸入:\\\\n\\\\nitem = input(\\\"輸入項目名稱:\\\")\\\\nsales = input(\\\"翰入數量:\\\")\\\\n\\\\n輸出必須符合以下要求\\\\n* 字串必須括在雙引號内。\\\\n* 數字不得用引號或其他字元括起來。\\\\n* 每個項目必須用逗號隔開。\\\\n\\\\n你需要完成程式碼以符合要求。\\\\n\\\\n你應該使用哪三個程式碼片段?每個正確的答案都提供了一個完整的解決方案。請選擇三個\\\\n',q.options=`\\\\nprint(item + ',' + sales)\\\\n${a}\\\\nprint('\\\"' + item + '\\\",' + sales)\\\\n${a}\\\\nprint('\\\"%s\\\",%s' % (item, sales))\\\\n${a}\\\\nprint(\\\"{0},{1}\\\".format(item, sales))\\\\n${a}\\\\nprint('\\\"{0}\\\",{1}'.format(item, sales))\\\\n`,q.content=\\\"\\\",q.answer=[1,2,4],l.push(q),q={},q.type=r,q.description=\\\"\\\\n橘子蘋果公司正在為員工建立一個籃球場,以提高公司士氣。\\\\n\\\\n你正在創建一個Python 程式,員工可以使用它來記錄他們的平均得分。\\\\n\\\\n該程式必須允許使用者輸入他們的名字和當前分數。該程式將輸出使用者名和使用者的平均分數。輸出必須符合以下要求\\\\n* 使用者姓名必須提靠左對齊的。\\\\n* 如果使用者姓名少於20個字元,則必須在右側添加額外的空間。\\\\n* 平均分數必須有三個位置在小數點的左邊和一個位置在小數點右邊XXX.X)。\\\\n\\\\n你要如何完成程式碼?回答時,請在回答區中選擇適當的程式碼片段。\\\\n\\\",q.options=`\\\\n%-20i\\\\n%-20d\\\\n%-20f\\\\n%-20s\\\\n${a}\\\\n%1.5s\\\\n%5.1f\\\\n%5.1s\\\\n%1.5f\\\\n`,q.content=`\\\\nname = input (\\\"你的名字是什麼?\\\")\\\\nScore = 0\\\\ncount = 0\\\\nsum = 6\\\\nwhile (score != -1):\\\\n score = int(input (\\\"輸入你的分数:(輸入-1結束程式)\\\"))\\\\n if score == -1:\\\\n break\\\\n sum += core\\\\n count += 1\\\\naverage = sum / count\\\\nprint(\\\"${p}, 你的平均分数是: ${p}\\\"%(name, average))\\\\n`,q.answer={0:3,1:1},l.push(q),q={},q.type=r,q.description=\\\"\\\\n橘子蘋果公司需要使用 Python 程式碼來幫忙更新他們的檔案系統。你必須創建個簡單的檔案操作程式來執行以下操作的\\\\n* 檢查檔案是否存在。\\\\n* 如果該檔案存在,則顯示其内容。\\\\n* 如果該檔案不存在,請使用指定的名稱創建新檔。\\\\n* 將“清單末尾”一詞追加到檔案最後。\\\\n\\\\n您需要完成代碼以滿足要求。\\\\n\\\\n你要如何完成這段程式碼?回答時,在回答區選擇適當的程式碼片段。\\\\n\\\",q.options=`\\\\nisfile('myFile.txt'):\\\\nos.exist('myFile.txt'):\\\\nos.find('myFile.txt'):\\\\nos.path.isfile('myFile.txt'):\\\\n${a}\\\\noutput('myFile.txt')\\\\nprint(file.get('myFile.txt'))\\\\nprint(file.read())\\\\nprint('myFile.txt')\\\\n${a}\\\\nopen('myFile.txt', 'a')\\\\nopen('myFile.txt\\\", ')\\\\nopen('myFile.txt', 'w')\\\\n${a}\\\\nappend\\\\nfile.add\\\\nfile.write\\\\nwrite\\\\n`,q.content=`\\\\nimport os\\\\nif ${p}\\\\n file = open (\\\"my File.txt')\\\\n ${p}\\\\n file.close()\\\\nfile = ${p}\\\\n${p} ('清單末尾')\\\\nfile.close()\\\\n`,q.answer={0:3,1:2,2:0,3:2},l.push(q),e.exports=l},{\\\"../constants\\\":2}],17:[function(n,e,t){const{OPTION_SPLITER:i,CONTENT_SELECTER:r,OPTIONS:s,SELECT:o,TRUE_OR_FALSE:a,DRAG_AND_DROP:p}=n(\\\"./constants\\\");function c(n){return\\\"\\\"!=n}e.exports=function(n){return n.forEach((n,e)=\u003e{try{if(n.type===s\u0026\u0026(n.options=n.options.split(i).filter(c).map(n=\u003en.trim()),n.answer=function(n,e){obj={};for(let t=0;t\u003cn;t++)obj[t]=e.includes(t);return obj}(n.options.length,n.answer)),n.type===a\u0026\u0026(n.options=n.options.split(i).filter(c).map(n=\u003en.trim())),n.type===o){const e=n.options.split(i).map((e,t)=\u003e{const i=e.split(\\\"\\\\n\\\").filter(c).map(n=\u003en.trim());return i.answer=n.answer[t],i}),t=n.content.split(r),s=[];for(let n=0;n\u003ct.length;n++)s.push(t[n]),e[n]\u0026\u0026(e[n].idx=n,s.push(e[n]));n.content=s}if(n.type===p){n.options=n.options.split(i).filter(n=\u003e\\\"\\\"!=n).map(n=\u003en.trim());const e=n.content.split(r),t=[];for(let i=0;i\u003ce.length;i++)if(t.push(e[i]),i\u003ce.length-1){let e=JSON.parse(JSON.stringify(n.options));e.idx=i,t.push(e)}n.content=t}n.description=n.description.trim()}catch(t){console.log(t,e,n)}}),n}},{\\\"./constants\\\":2}],18:[function(n,e,t){const i=n(\\\"./constants\\\"),r=n(\\\"./exam_parse\\\");n(\\\"./data/basic_01\\\");n(\\\"./components\\\");const{OPTIONS:s,SELECT:o,TRUE_OR_FALSE:a,DRAG_AND_DROP:p,EXAM_TYPE_MOCK:c,EXAM_TYPE_BASIC:l,MODE_INIT:d,MODE_EXAM:q,MODE_REVIEW:u,MODE_RESULT:$,MODE_SHOW_RESULT:f}=i,m={BASIC_01:n(\\\"./data/basic_01.js\\\"),BASIC_02:n(\\\"./data/basic_02.js\\\"),BASIC_03:n(\\\"./data/basic_03.js\\\"),BASIC_04:n(\\\"./data/basic_04.js\\\"),BASIC_05:n(\\\"./data/basic_05.js\\\"),BASIC_06:n(\\\"./data/basic_06.js\\\"),BASIC_07:n(\\\"./data/basic_07.js\\\"),BASIC_08:n(\\\"./data/basic_08.js\\\"),BASIC_09:n(\\\"./data/basic_09.js\\\"),BASIC_10:n(\\\"./data/basic_10.js\\\"),BASIC_11:n(\\\"./data/basic_11.js\\\"),BASIC_12:n(\\\"./data/basic_12.js\\\"),MOCK_1:n(\\\"./data/mock_1.js\\\"),MOCK_2:n(\\\"./data/mock_2.js\\\")};for(let n in m)m[n]=r(m[n]),m[n].id=n;let h=new URL(window.location.href).searchParams.get(\\\"access\\\");if(h)for(key in m)!1===h.split(\\\",\\\").includes(key)\u0026\u0026delete m[key];app=new Vue({el:\\\"#app\\\",data:{OPTIONS:s,SELECT:o,TRUE_OR_FALSE:a,DRAG_AND_DROP:p,MODE_INIT:d,EXAM_TYPE_MOCK:c,EXAM_TYPE_BASIC:l,MODE_INIT:d,MODE_EXAM:q,MODE_REVIEW:u,MODE_SHOW_RESULT:f,MODE_RESULT:$,exams:m,mode:d,current:0,isShowMenu:!0,isShowResult:!1,exam:[],answers:{},intervalId:void 0,timer:0},methods:{toggleFullscreen(){if(window.fullScreen||window.innerWidth==screen.width\u0026\u0026window.innerHeight==screen.height)document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen\u0026\u0026document.msExitFullscreen();else{let n=document.getElementById(\\\"app\\\");n.requestFullscreen?n.requestFullscreen():n.mozRequestFullScreen?n.mozRequestFullScreen():n.webkitRequestFullscreen?n.webkitRequestFullscreen():n.msRequestFullscreen\u0026\u0026n.msRequestFullscreen()}},showMenu(){confirm(\\\"離開測驗?\\\")\u0026\u0026(this.isShowMenu=!0,clearInterval(this.intervalId))},showExam(n){this.exam=this.exams[n],this.mode=q,this.isShowMenu=!1,this.answers={};for(let n=0;n\u003cthis.exam.length;n++){const e=JSON.parse(JSON.stringify(this.exam[n].answer));for(key in e)this.exam[n].type==s?e[key]=!1:this.exam[n].type==a?e[key]=void 0:e[key]=-1;this.$set(this.answers,n,e)}this.timer=this.getExamTimeSec(this.exam),this.intervalId=setInterval(()=\u003e{this.timer--,this.timer\u003c=0\u0026\u0026(this.finish(),alert(\\\"時間到囉!\\\"))},1e3)},showReview(n){this.exam=this.exams[n],this.mode=u,this.isShowMenu=!1,this.answers={};for(let n=0;n\u003cthis.exam.length;n++){const e=JSON.parse(JSON.stringify(this.exam[n].answer));this.$set(this.answers,n,e)}},updateAnswer(n){let e=n[0],t=n[1];this.$set(this.answers[this.current],e,t)},prev(){this.current\u003e0\u0026\u0026this.current--},next(){this.current\u003cthis.exam.length-1\u0026\u0026this.current++},finish(){clearInterval(this.intervalId),this.mode=$,this.current=0,this.isShowResult=!0;const n=`${this.countCorrectAnswer()} / ${this.exam.length}`;localStorage.setItem(\\\"exam_\\\"+this.exam.id,n)},isCorrect(n){return JSON.stringify(this.exam[n].answer||{})==JSON.stringify(this.answers[n]||{})},typeToText:n=\u003en===s?\\\"選擇題/多選題\\\":n===o?\\\"下拉選單題\\\":n===a?\\\"是非題\\\":n===p?\\\"配對題\\\":void 0,countCorrectAnswer(){return this.exam.filter((n,e)=\u003eJSON.stringify(n.answer)===JSON.stringify(this.answers[e])).length},isExistScoreOf:n=\u003enull!=localStorage.getItem(\\\"exam_\\\"+n),getExamTimeSec:n=\u003e60*(n.length+5)},computed:{canEdit(){return this.mode!==$},showAnswer(){return this.mode!==q},isFirst(){return 0===this.current},isLast(){return this.current===this.exam.length-1},countdown(){let n=this.timer,e=Math.floor(n/60),t=n%60;return e\u003c10\u0026\u0026(e=\\\"0\\\"+e),t\u003c10\u0026\u0026(t=\\\"0\\\"+e),e+\\\":\\\"+t},countCorrectAnswer(){return this.exam.filter((n,e)=\u003eJSON.stringify(n.answer)===JSON.stringify(this.answers[e])).length}}})},{\\\"./components\\\":1,\\\"./constants\\\":2,\\\"./data/basic_01\\\":3,\\\"./data/basic_01.js\\\":3,\\\"./data/basic_02.js\\\":4,\\\"./data/basic_03.js\\\":5,\\\"./data/basic_04.js\\\":6,\\\"./data/basic_05.js\\\":7,\\\"./data/basic_06.js\\\":8,\\\"./data/basic_07.js\\\":9,\\\"./data/basic_08.js\\\":10,\\\"./data/basic_09.js\\\":11,\\\"./data/basic_10.js\\\":12,\\\"./data/basic_11.js\\\":13,\\\"./data/basic_12.js\\\":14,\\\"./data/mock_1.js\\\":15,\\\"./data/mock_2.js\\\":16,\\\"./exam_parse\\\":17}]},{},[18]);\"}","created_at":"2020-09-04T11:49:18.735+08:00","updated_at":"2020-09-08T09:57:05.956+08:00","name":"online_exam_v2","language":"web","screenshot":{"url":"/uploads/project/screenshot/187907/8b08733e10531cdfa31342d7eda99165.jpg"},"parent_id":3,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":386,"hashid":"882szdqz","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":3193599,"file_name":"koding.png","project_id":187907,"asset_id":182920,"created_at":"2020-09-04T11:49:18.741+08:00","updated_at":"2020-09-04T11:49:18.741+08:00"}]
Orange Apple Learning Platform
My Projects
View Project Page
Export
Remix
Import
Delete
Download Android APP (APK)
Screenshot
Open Web Site
繁中
简中
English
日本語
1:1:1
1:1
Full Width
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer
Scan the QRCode below with your phone to install
Or you can
download APK
to this computer