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

화면 8. Math Input.submitCount [source]

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

화면 번호8 / 28
문서 항목 설명 (원문)submitCount Gets the number of times the input has been submitted.

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

화면 8 캡처

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

2. CL이 입력된 곳

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

번호이름종류CL 코드 원문, 번역, 설명
1레이블 없는 그래프그래프
# We wait to see if the student has submitted their guess before displaying
# anything within the graph exhibit.
▷ 학생이 답을 제출했는지 확인하기 전에는 그래프 전시 화면 안에 아무것도 표시하지 않는다.

number("G_{uessX}"):

	when guess.submitted guess.numericValue
    otherwise 1000
▶ 그래프의 변수 G_{uessX}는 guess가 제출되었으면(guess.submitted) 그 수식 답변의 계산한 값(guess.numericValue), 그렇지 않으면 1000으로 한다.
number("이름")은 그래핑 계산기 안의 변수 값을 정한다. submitted는 수식 답변이 제출되었는지를 참 또는 거짓으로 알려 주고, numericValue는 입력한 식을 계산한 값을 가져온다. 예를 들어 "2+2"는 숫자 4를 돌려준다. when은 조건을 차례로 확인해 처음 맞는 값을 쓴다.
2레이블 없는 메모메모
# "submitCount" on this screen will display the number of times
# the expression input "guess" has been submitted.
▷ 이 화면의 "submitCount"는 수식 답변 "guess"가 제출된 횟수를 표시한다.

content:

"Guess the secret number and we'll tell if you if it's to the left or right of your guess.

You've guessed ${guess.submitCount} times."
▶ 메모의 내용(content)은 "Guess the secret number and we'll tell if you if it's to the left or right of your guess."(비밀 숫자를 맞혀 보시오. 추측한 값의 왼쪽인지 오른쪽인지 알려 준다.) 아래에 빈 줄을 하나 두고 "You've guessed ${guess.submitCount} times."(지금까지 ○번 추측했다.)가 이어지는 글로 한다.
submitCount는 입력이 제출된 횟수를 알려 준다. ${ }는 글자 안에 변수의 값을 끼워 넣는 표기이고, content는 메모에 직접 적은 글을 덮어쓴다.