Home
Project Folders
Teacher Resources
Student Resources
How Do I?
Literacy
MWForum
Site Map
Search
Our Team

MWForum Message [Date Index] [Threads] [Authors] [Attachments] [Subscribe]

[Thread Prev] [Thread Next]

To: MicroWorlds Forum <mwforum@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: MIA, Ask an Expert: answer having more than one word
From: Rotem Kimchi <rotemk2@xxxxxxxxxxxxxxxx>
Date: Sun, 20 Mar 2011 20:47:22 +0200

hi Susan,



you using ifelse statement wrong.



*ifelse* *true-or-false instruction-list1 instruction-list2:*

**

*Its means that you have a condition and for each posibale result of the
condition (true or false) an action will be taken for true instruction1 for
false instruction2 *



*you can try to change your procedure like that using if statement instead
of ifelse*

**
to questK1
question [What are the answers?]
if answer = "|99 cookies|

[announce [That's right!] ]

if answer = "|73 cookies|

[announce [Wrong answer! Try again.]]
end

rotem
 2011/3/20 Susan Weiss <sweiss@xxxxxxxxxxxxxxxxxx>

> I tried this:
>
> to questK1
> question [What are the answers?]
> ifelse answer = "|99 cookies|
>
> ifelse answer = "|73 cookies|
>
> [announce [That's right!] ]
>
> [announce [Wrong answer! Try again.]]
> end
>
> On my first trial trying  both answers, everything perfectly worked but on
> the second trial only the second answer: 73 cookies worked.  What am I doing
> wrong?  I switched the order around of the answers and again only the second
> one worked.
>
> thanks for all your help.
> Susan
>
> On Sun, Mar 20, 2011 at 12:44 PM, Daniel Ajoy <da.ajoy@xxxxxxxxx> wrote:
>
>
>>  from: susan weiss <sweiss@xxxxxxxxxxxxxxxxxx>
>>> date: Sun Mar 20 06:04:59 2011
>>> platform: Mac OS10
>>> version: MicroWorlds Ex
>>> My students have written math questions.   They want the answers to be
>>> "99 cookies" for example.  What is the correct punctuation which allows the
>>> person enter more than one word with a number?   So far we have only been
>>> able to do 99_cookies.
>>>
>>>
>>
>> The output of answer is a "word" (in the Logo Programming sense of the
>> word)
>>
>> To specify "words with spaces" in MicroWorlds you say
>>
>> show "|99 cookies|
>> 99 cookies
>>
>> show word? "|99 cookies|
>> true
>>
>> So, you would say something like:
>>
>> if answer = "|99 cookies| [...]
>>
>> Daniel
>> OpenWorld Learning
>>
>>
>>
>
>
>
>

  • Previous by thread: Re: MIA, Ask an Expert: answer having more than one word
  • Next by thread: Re: MIA, Ask an Expert: answer having more than one word

  • To save an attachment to your computer, PC users should right-click (Mac users, click and hold the mouse button) on the link and then choose 'save target as' from the pop-up menu. A window will then pop up in which you can choose a location for the file.


    © copyright 2001 - 2008