alice-teacher Problem with Alice 2 create function capability
robert durtschi
robert.durtschi at gcsu.edu
Fri May 20 06:24:16 EDT 2016
Apparently when using Alice 2.4.2 to create a new function, one is not allowed to return anything except a number nor change the pre-coded return 1 to return <number variable> nor use and of the constructs at the bottom of the edit window, if/else, loop, while, etc., nor drag a non-numeric variable down into the edit window
In other words, the create new function button is broken.
What i am trying to do is set up an Alice 2 world to replace the pseudo code currently being used in the CIS 120 "Intro to computers" class at the local college. I think it would be a lot more helpful of the student's understanding of they could actually see the results of the code they write.
Scenario: A robot is sitting in a chair with its arms down. Write an algorithm, using pseudo-code, to make the robot:
* stand up
* walk until it senses a wall
* turn around
* walk back to the chair
* sit back down in the origin starting position
Finally, output the total number of steps taken.
Commands:
In addition to our standard pseudo code commands, you must also use the following robot control commands:
* sit
* stand
* step (one step forward)
* raise arms (parallel to floor)
* lower arms (pointing to floor)
* sense (only if arms are raised) returns a Boolean value. TRUE if at the wall.
* turn (90 degrees right)
I have easily implemented all of the commands "bunny sit", bunny stand", "bunny step", etc. but ran into a major SNAFU when I tried to implement the "sense" command. I could just have them use a primitive function: "bunny is within threshold of object but I wanted to preserve the existing set of commands as much as possible.
It would be real helpful if the Alice maintenance team could fix Alice 2 create function capability and add the ability to return a Boolean variable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.andrew.cmu.edu/pipermail/alice-teachers/attachments/20160520/f1164109/attachment.html>
More information about the alice-teachers
mailing list