/    Sign up×
Community /Pin to ProfileBookmark

interactive dialog conversation w computer

Hello
I am a 6th grade teacher trying to help my students get a feel for interactivity with computers.
I currently do an assignment in the LOGO programming language in which each student creates an interactive dialog for the user of their program. The first part is oppinion based and later includes conditional programming with ifelse and local variables. The goal is to create the illusuion that the computer is actually responding to the user’s answers.

Here is a sample of the opinion portion created by a student. (In LOGO)

[QUOTE]

TO Q&A

CT
QUESTION [My name is Edna. What’s your name?]
INSERT [Hi]
INSERT CHAR 32
INSERT ANSWER
PRINT [.]
MAKE “NAME ANSWER
WAIT 10

QUESTION [What is your favorite flavor of ice cream?]
INSERT [You like]
INSERT CHAR 32
INSERT ANSWER
PRINT [?]
WAIT 10
PRINT [I think bubble gum with walnuts is much better.]
WAIT 30

QUESTION [What toppings do you like on your ice cream?]
INSERT [I like]
INSERT CHAR 32
INSERT ANSWER
INSERT CHAR 32
INSERT [too. It’s much better with]
INSERT CHAR 32
INSERT ANSWER
INSERT CHAR 32
PRINT [on top.]
WAIT 20

INSERT [Goodbye]
INSERT CHAR 32
INSERT :NAME
INSERT [. I’ll speak to you later.]

END

[/QUOTE]

I would like to do this assignment in Javascript.
Would this be hard to do? Is it better suited for Flash?
Any help would be great.

to post a comment
JavaScript

2 Comments(s)

Copy linkTweet thisAlerts:
@7studOct 30.2004 — Hi,

I'm not sure what that does, but it looks simple. ? If you want to ask the user questions, then essentially ignore the answers, and spit back canned responses, it should be simple enough.

However, on a basic level, javascript interacts with the user by having the user fill out forms with text fields, and then the user clicks on a button to submit the data. So, the interface is not the same as when you see the text of a question scroll across a computer screen followed by a blinking prompt waiting for the user's answer.

As your javascript expertise increases, all sorts of things can be accomplished, as can be seen here with this Tetris game:

http://gosu.pl/demo/JsTetris/Tetris.html(keypad up arrow rotates the objects, and the left and right arrows move the objects)

which is a far cry from the rudiments of entering data into a text field and clicking a submit button.
Copy linkTweet thisAlerts:
@whitneytauthorOct 31.2004 — The key part to this assignment for the kids is to incorporate the user's response preferably into the computer's next question. If not in the question, incorporate it into a response before asking the next question.(as we did in the LOGO code above) Im trying to get my students to anticipate the user's range of responses and build their questions accordingly.

If a form is the only option for interactivity in javascript, can it include a variable in the sentence structure whose value is derived from the last question asked?
×

Success!

Help @whitneyt spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...