# 수학 1(1-1,1-2,1,2,3,7)

## 158 days ago by nim_od

#1-1 pdf 문제 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 num_list=[2,3,5,7] x=random.choice(num_list) y=randint(2,5) ans=x**(2/y) return x,y,ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 x,y,ans =problem_num() answer_list=[] answer_list.append(ans) while len(answer_list)!=5: _y=randint(2,7) answers=x**(2/_y) if answers in answer_list: continue answer_list.insert(0,answers) return answer_list,x,y select_answer_list,x,y =problem_answer_list() answer=select_answer_list[4] random.shuffle(select_answer_list) #문제 show(html("<p>$\\sqrt[%s]{%s^2}$의 값을 구하시오.</p>"%(y,x))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,latex(select_answer_list[i])))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): $n$제곱근은 해당 수의 $\\frac 1n$제곱과 동일하다. <br>$\\therefore \\sqrt[%s]{%s^2}=%s^{2/%s}=%s$ "%(y,x,x,y,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): $n$제곱근은 해당 수의 $\\frac 1n$제곱과 동일하다. <br>$\\therefore \\sqrt[%s]{%s^2}=%s^{2/%s}=%s$ "%(y,x,x,y,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window

#1-2 pdf 문제 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 num_list=[-4,-2,2,4,6,8] x=random.choice(num_list) ans=10**(x/2) return x,ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 x,ans =problem_num() answer_list=[] answer_list.append(ans) while len(answer_list)!=5: _x,_ans=problem_num() answers=10**(_x/2) if answers in answer_list: continue answer_list.insert(0,answers) return answer_list,x select_answer_list,x=problem_answer_list() answer=select_answer_list[4] random.shuffle(select_answer_list) #문제 show(html("<p>$\\sqrt{%s}$를 간단히 하여라.</p>"%(round(10**x,6)))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,latex(select_answer_list[i])))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): $\\sqrt {%s}$를 간단히 하면 <br>$\\sqrt{%s}=\\sqrt {10^{%s}}=10^{%s}=%s$ "%(round(10**x,7),round(10**x,7),x,x/2,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): $\\sqrt {%s}$를 간단히 하면 <br>$\\sqrt{%s}=\\sqrt {10^{%s}}=10^{%s}=%s$ "%(round(10**x,7),round(10**x,7),x,x/2,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window

#1 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 global m1,m2,n1,n2,n3 m1=random.choice([2,3,5,7]) m2=random.choice([2,3]) n1=randint(2,4) n2=randint(2,5) n3=randint(2,5) while n1==n2: n2=randint(2,5) while m1==m2: m1=random.choice([2,3]) x = log(m1^n1,m2*(m1^n3)) y = log(m1^n2,m2) ans = n1/x - n2/y return ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 ans = problem_num() answer_list=[] answer_list.append(int(ans)) while len(answer_list)!=5: answers=randint(1,11) if answers in answer_list: continue answer_list.insert(0,answers) return answer_list select_answer_list=problem_answer_list() answer=select_answer_list[4] select_answer_list=sorted(select_answer_list) #문제 show(html("<p>$%s^x=%s, %s^y=%s$를 만족시키는 두 실수 $x,y$에 대하여 식 $\\cfrac %s x - \\cfrac %s y$의 값은?</p>"%(m2*(m1^n3),m1^n1,m2, m1^n2, n1,n2))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,select_answer_list[i]))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): <br> 로그의 성질을 사용하여 식을 정리하면,<br><br> $x=\\log_{%s}{%s}=\\cfrac{log %s}{log %s}, y=\\log_{%s}{%s}=\\cfrac {log %s}{log %s}$이므로, <br><br> $\\cfrac %s x - \\cfrac %s y=%s\\cfrac {log %s}{log %s^%s}-%s\\cfrac {log %s}{log %s^%s}=\\cfrac {%s{log %s}}{%s{log %s}}-\\cfrac {%s{log %s}}{%s{log %s}}=\\cfrac {\\log_{%s}{%s}}{\\log_{%s}{%s}}-\\cfrac {\\log_{%s}{%s}}{\\log_{%s}{%s}}$<br><br>$=\\log_{%s}{%s}-log_{%s}{%s}=\\cfrac {log_{%s}{%s}}{log_{%s}{%s}}=log_{%s}{\\cfrac{%s}{%s}}=log_{%s}{%s}=log_{%s}{%s^{%s}}=%s\\log_{%s}{%s}=%s$<br>"%(m2*(m1^n3),m1^n1,m1^n1,m2*(m1^n3),m2, m1^n2,m1^n2,m2,n1,n2,n1,m2*(m1^n3),m1,n1,n2,m2,m1,n2,n1,m2*(m1^n3),n1,m1,n2,m2,n2,m1,m1,m2*(m1^n3),m1,m1,m1,m2,m1,m1,m1,m2*(m1^n3),m1,m2,m1,m2*(m1^n3),m1,m2,m1,m2*(m1^n3),m2,m1,m1^n3,m1,m1,n3,n3,m1,m1,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): 로그의 성질을 사용하여 식을 정리하면,<br><br> $x=\\log_{%s}{%s}=\\cfrac{log %s}{log %s}, y=\\log_{%s}{%s}=\\cfrac {log %s}{log %s}$이므로, <br><br> $\\cfrac %s x - \\cfrac %s y=%s\\cfrac {log %s}{log %s^%s}-%s\\cfrac {log %s}{log %s^%s}=\\cfrac {%s{log %s}}{%s{log %s}}-\\cfrac {%s{log %s}}{%s{log %s}}=\\cfrac {\\log_{%s}{%s}}{\\log_{%s}{%s}}-\\cfrac {\\log_{%s}{%s}}{\\log_{%s}{%s}}$<br><br>$=\\log_{%s}{%s}-log_{%s}{%s}=\\cfrac {log_{%s}{%s}}{log_{%s}{%s}}=log_{%s}{\\cfrac{%s}{%s}}=log_{%s}{%s}=log_{%s}{%s^{%s}}=%s\\log_{%s}{%s}=%s$<br>"%(m2*(m1^n3),m1^n1,m1^n1,m2*(m1^n3),m2, m1^n2,m1^n2,m2,n1,n2,n1,m2*(m1^n3),m1,n1,n2,m2,m1,n2,n1,m2*(m1^n3),n1,m1,n2,m2,n2,m1,m1,m2*(m1^n3),m1,m1,m1,m2,m1,m1,m1,m2*(m1^n3),m1,m2,m1,m2*(m1^n3),m1,m2,m1,m2*(m1^n3),m2,m1,m1^n3,m1,m1,n3,n3,m1,m1,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window

#2 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 num_list=[2,3,5] x=random.choice(num_list) y=randint(2,4) z=random.choice(num_list) ans=x^(-y/x) * x^(z/x) print(ans) print() return x,y,z,ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 x,y,z,ans =problem_num() answer_list=[] answer_list.append(ans) while len(answer_list)!=5: _x,_y,_z,_ans=problem_num() answers=x^(-_y/x) * x^(_z/x) if answers in answer_list: continue answer_list.insert(0,answers) return answer_list,x,y,z select_answer_list,x,y,z=problem_answer_list() answer=select_answer_list[4] random.shuffle(select_answer_list) #문제 show(html("<p>$%s^{-\\frac {1} {%s}} \\times (%s^{\\sqrt %s})^{\\frac {\\sqrt %s} {%s}}$의 값을 구하시오</p>"%(x^y,x,x,z,z,x))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,latex(select_answer_list[i])))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): <br>$%s^{-\\frac {1} {%s}} \\times (%s^{\\sqrt %s})^{\\frac {\\sqrt %s} {%s}} = %s^{%s \\times ({-\\frac {1} {%s}})} \\times %s^{\\sqrt %s \\times{\\frac {\\sqrt %s} {%s}}}$ <br> $= %s^{%s} \\times %s^{(\\frac {%s}{%s})}=%s$ "%(x^y,x,x,z,z,x, x,y,x,x,z,z,x, x,-y/x,x,z,x,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): 식을 간단히 하면, <br>$%s^{-\\frac {1} {%s}} \\times (%s^{\\sqrt %s})^{\\frac {\\sqrt %s} {%s}} = %s^{%s \\times ({-\\frac {1} {%s}})} \\times %s^{\\sqrt %s \\times{\\frac {\\sqrt %s} {%s}}}$ <br> $= %s^{%s} \\times %s^{(\\frac {%s}{%s})}=%s$ "%(x^y,x,x,z,z,x, x,y,x,x,z,z,x, x,-y/x,x,z,x,latex(answer)))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window

#3 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 x=randint(2,8) y=randint(2,6) n1=random.choice([-1,1]) n2=random.choice([-1,1]) while n1==n2: n2=random.choice([-1,1]) y=randint(2,6) print(n1,x,n2,y) ans = x/n1 - y/n2 print(ans) print() return x,y,n1,n2,ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 x,y,n1,n2,ans =problem_num() answer_list=[] answer_list.append(int(ans)) while len(answer_list)!=5: answers=randint(-20,20) if answers in answer_list: continue answer_list.insert(0,answers) return answer_list,x,y,n1,n2 select_answer_list,x,y,n1,n2=problem_answer_list() answer=select_answer_list[4] select_answer_list=sorted(select_answer_list) #문제 show(html("<p>$\\log_{%s}{%s}-\\log_{%s}{%s}$ 의 값을 구하시오.</p>"%(2^n1,2^x,3^n2,3^y))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,select_answer_list[i]))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): $\\log_{%s}{%s}-\\log_{%s}{%s}=\\log_{2^{%s}}{2^%s}-\\log_{3^{%s}}{3^%s}$<br>$=\\frac {%s}{%s}\\log_{2}{2}-\\frac{%s}{%s}\\log_{3}{3}={%s}-{%s}=%s$ <br>"%(2^n1,2^x,3^n2,3^y,n1,x,n2,y,x,n1,y,n2,x/n1,y/n2,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): $\\log_{%s}{%s}-\\log_{%s}{%s}=\\log_{2^{%s}}{2^%s}-\\log_{3^{%s}}{3^%s}$<br>$=\\frac {%s}{%s}\\log_{2}{2}-\\frac{%s}{%s}\\log_{3}{3}={%s}-{%s}=%s$ <br>"%(2^n1,2^x,3^n2,3^y,n1,x,n2,y,x,n1,y,n2,x/n1,y/n2,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window

#7 import random def problem_num(): #문제에 들어갈 값 범위 랜덤 함수 global x_,n1,a,ans var('a') x_=randint(1,2) a=randint(1,5) f(x)=-x^2+2*x_*x+a ans=2^(f(x_)) return ans # 답과 문제 랜덤 값 반환 def problem_answer_list(): # 답안과 결합될 숫자(랜덤화 및 중복 값 제거)를 생성하는 함수 ans =problem_num() answer_list=[] answer_list.append(int(ans)) while len(answer_list)!=5: n=randint(1,7) answers=2^n if answers in answer_list: continue answer_list.insert(0,answers) return answer_list select_answer_list=problem_answer_list() answer=select_answer_list[4] select_answer_list=sorted(select_answer_list) #문제 show(html("<p>$0\\le x \\le 3$에서 함수 $f(x)=2^{(-x^2+%s x+a)}$의 최솟값이 $%s$일 때, $f(x)$의 최댓값을 구하시오.(단, $a$는 상수이다.)"%(2*x_,2^a))) for i in range(5): show(html("<p>%s. $%s$</p>"%(i+1,latex(select_answer_list[i])))) #답안 확인 @interact def _(answers = selector([(None, ""),(select_answer_list[0], "1"), (select_answer_list[1], "2"), (select_answer_list[2], "3"), (select_answer_list[3], "4"), (select_answer_list[4], "5")], buttons=True), auto_update=False): if answer == answers: show(html("<p><span style='color:blue'>Correct(정답)</span></p><p>Answer(답안): <br>함수 $f(x)=2^{(-x^2+%s x+a)}$에서 지수의 최솟값은 $a$이므로 $2^a=2^{%s} \\to a=%s$<br>이때, 지수의 최댓값은 $a+%s=%s$이므로, $f(x)$의 최댓값은 $2^{%s}=%s$이다."%(2*x_,a,a, x_^2,a+x_^2,a+x_^2,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('success') fl.close() elif answers == None: show(html("<p><span style='color:blue'>Please input your answer in the spaces above.</span></p><p>(위의 빈칸에 답을 입력하고 [Update(확인)] 버튼을 클릭하세요.)</p>")) else: show(html("<p><span style='color:red'>Incorrect(오답)</span></p><p>Answer(답안): <br>함수 $f(x)=2^{(-x^2+%s x+a)}$에서 지수의 최솟값은 $a$이므로 $2^a=2^{%s} \\to a=%s$<br>이때, 지수의 최댓값은 $a+%s=%s$이므로, $f(x)$의 최댓값은 $2^{%s}=%s$이다."%(2*x_,a,a, x_^2,a+x_^2,a+x_^2,answer))) show(html("<input type = 'hidden' name = 'checking' class = 'val_chk' value = '1'>")) fl = open("record.txt",'w') fl.write('fail') fl.close()

## Click to the left again to hide and once more to show the dynamic interactive window