# Checking answer for a time 11:45

Another checking answer question-- how to see if a student entered a correct time. 11:45 to be specific.

Never mind! I think I got it-- correct: this.latex=â€ś11:45â€ť

Do you need format too (i.e. 1145 vs 11:45)? You still might want to use countNumberUsage to avoid incorrects because of spaces or whatever.

1 Like

You could probably do a more complete job checking here, but maybe this is a start? 11:45? Ă˘Â€Â˘ Activity Builder by Desmos

Avoids countNumberUsage as well

Tricky. I think thatâ€™s awesome!

Thatâ€™s neat, but I donâ€™t get how it is working, yet! Have to stare at it some more. So fun!

Getting there on the understanding of the approach! Here is the AB if interested. Iâ€™m trying to use the â€śThree Reads with Problem Stemâ€ť strategy here. Thinking about useful feedback as well-- text based. Doing some sort of super cool Desmos interaction would be great?? Needed?? ROI?

He essentially made the time part of a conditional function. Without the variable name â€ś11:45â€ť would look like this:

`f(x)={x=11:45,0}`
which essentially says â€śif x=11, then f(x)=45. Otherwise, f(x)=0.â€ť

Then, he evaluates the student expression at 11, which should be 45 if correct. Any other evaluation is 0. If a student entered 10:45, 11 would evaluate at 0, because the student function would be:
`f(x)={x=10:45,0}`

1 Like