← 수업 제작 도구
홈 › Components › Math Response (수식 답변) › 화면 3

화면 3. Math Input.timeSinceSubmit [source]

원본: Computation Layer 문서(Math Response (수식 답변)) · Try It (원본 화면)

화면 번호3 / 28
문서 항목 설명 (원문)timeSinceSubmitmaxTime: number Gets the seconds (plus milliseconds) since the the expression input was submitted. It resets to zero if the student focuses into the input again. Increase that time by passing a parameter, as in timeSincePress(20).

1. 화면 캡처 (빨간 번호 = 아래 표의 번호)

화면 3 캡처

화면에 적힌 영어 문구(원문):

2. CL이 입력된 곳

코드 안의 회색 줄은 원문 영어 주석이고, 파란 줄은 그 영어 주석의 번역이며, 연분홍 줄은 코드가 하는 일의 설명이다.

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프
# This imports the time since the expression input
# was submitted.
▷ 수식 답변이 제출된 뒤 지난 시간을 가져온다.

number("t_0"): raceButton.timeSinceSubmit
▶ 그래프의 변수 t_0은 수식 답변 raceButton을 제출한 뒤 지난 시간(raceButton.timeSinceSubmit)으로 한다.
number("이름")은 그래핑 계산기 안의 변수 값을 정한다. timeSinceSubmit은 수식 답변을 제출한 뒤 지난 시간(초)을 알려 준다. 학생이 입력칸을 다시 선택하면 0으로 돌아가고, 괄호 안에 숫자를 넣으면 그 숫자가 세는 최대 시간(초)이 된다.
# This imports the speed the student submitted # in the expression input. If the speed isn't defined # yet (if the input is blank for instance) we default # to "1". ▷ 학생이 수식 답변에 제출한 속도를 가져온다. 속도가 아직 정의되지 않았으면(예를 들어 입력이 비어 있으면) 기본값 "1"을 쓴다. number("s_{peed}"): firstDefinedValue(raceButton.numericValue,1) ▶ 그래프의 변수 s_{peed}는 raceButton.numericValue가 정의되어 있으면 그 값, 아니면 1로 한다.
firstDefinedValue(…)는 같은 종류의 인자를 여러 개 받아 처음으로 정의된(유효한) 값을 돌려준다. numericValue는 입력한 식을 계산한 값을 가져온다. 예를 들어 "2+2"는 숫자 4를 돌려준다.