Exercise - Question & Answer App
Your work
Write a program that it ask questions and then it gives red (Wrong answer) or green (Right answer) light and also gives sound signal.
You may need
- Request command
- eval command
- If...Else statements
Solutions
TI-Basic Code
Request "3+2*3 = ",answer
If answer=9 Then
Send "SET SOUND 200 TIME 2"
Send "SET COLOR 10 255 10 TIME 2"
Else
Send "SET SOUND 900 TIME 2"
Send "SET COLOR 255 10 10 TIME 2"
EndIf
Request "125/5",answer
If answer=25 Then
Send "SET SOUND 200 TIME 2"
Send "SET COLOR 10 255 10 TIME 2"
Else
Send "SET SOUND 900 TIME 2"
Send "SET COLOR 255 10 10 TIME 2"
EndIf
Notice: You can't copy-paste it because it includes HTML formattings