Scratch is a miracle. It’s popularity as a creative computing environment and its ubiquity around the world are truly impressive. Millions of children use the environment and have shared tens of millions of projects for others to enjoy and remix.

Scratch is a descendent of the Logo programming language. Logo was the first, and I would argue best, programming environment ever designed for children and learning. Logo is over fifty years old. While this would seem to be a million years old in technology years, Logo not only remains powerful in the hands of children, but benefits from a half-century worth of research, project ideas, and collective pedagogical wisdom.

Scratch adds media computation to the Logo bag of tricks available to kids. The sort of storytelling projects created in it appeals to adults who value kids being engaged in creative acts. A large part of Scratch’s appeal is the enormity of its project library full of projects that look like anyone can make them. It is also worth remembering that Scratch was originally designed for use in afterschool programs where teaching could not be guaranteed. Kids look at Scratch and know what to do. These are powerful and legitimate design features that contribute to its popularity.

Logo on the other hand was designed as a vehicle for education reform and created a “microworld” in which children could be mathematicians rather than just be taught math. Kids using Logo often fell in love with mathematics and felt intellectually powerful for the first time. Logo introduced the concept of the turtle, a representation of the child’s place in physical space, and turtle geometry, a math connected to movement in the real world. The turtle matched the intensity of children, captured their imagination, and was their collaborator in constructing mathematical knowledge. In 1968, Alan Kay first imagined the Dynabook, the progenitor of the modern laptop or tablet computer, after observing children programming in Logo. Kay recalls being amazed by the sophisticated mathematics young children were engaged in. Fifty-two years later, I feel the exact same way every time I use Logo with children.

*Today, a 5th grader came bounding up to me to announce, “Look what I accomplished!” She had taught the Logo turtle to draw a fraction, a bit of curricular detritus that normally invokes dread. In the process, she simultaneously demonstrated understanding of fractions, division, angle, linear measurement, and was on the verge of understanding variables all while teaching the turtle to draw. Turtle geometry may be the greatest mathematical prosthetic ever invented for learners. Logo creates a Mathland in which “messing about” and learning mathematics is as natural as a child develops oral language.

Math is the weakest link in every school. It remains the center for misery and instructionism in most. Seymour Papert taught me that the teaching of math ultimately jeopardizes all other efforts at educational progress. There is no gap as wide as the gulf between mathematics – a jewel of human intellect, and school math. Papert believed that even the most progressive schools become undone by the traditional diet and pedagogy of school math. He often discussed the need to create a mathematics children can love, rather than inventing tricks for teaching a “noxious” irrelevant math. Papert convinced me that no matter how project-based or student-centered a school happens to be, there remains a part of the day or week (math time) when coercion is reintroduced into the system. That is ultimately coercive to the nobler aims of the institution. Logo is and has been one of the few Trojan horses available for helping teachers rethink “math” on behalf of the kids they serve.

I fear for the future of such experiences in a world in which software has no value and there is no incentive for modern Logos to be created.

I just spent several hundred words stipulating that Scratch is a good thing. However, decisions were made in the evolution of Scratch that undermine its ability to make mathematics comprehensible, wondrous, relevant, and accessible for learners of all ages. Scratch could maintain fidelity to the powerful ideas inherent in Logo while adding all of the storytelling, animation, and media manipulation in a Web-based programming environment, but the designers of Scratch have decided to do otherwise. In fact, the most recent version, Scratch 3.0, has made it either too difficult or impossible to create the sorts of experiences I desire for my grandchildren and the children I’m privileged to teach.

I truly do not wish to step into the minefield of arguing about everyone’s favorite software, but my concerns are legitimate. I know readers may be thinking, “Hey, design your own software if you love Logo so much!” This is impossible in a world in which software has no value and there is no incentive for modern Logos to be created. Scratch benefits from mountains of government, university, and corporate funding, making it the 900-pound gorilla in coding for kids. That’s a good thing, but it could be better. My hope is that as Scratch evolves, consideration is given to bringing back some of the powerful mathematical ideas that have been lost.

Let me get specific. The following examples are a non-exhaustive list of the ways in which Scratch makes my life more difficult as a teacher and teacher educator concerned with providing authentic mathematical experiences.

Putting the turtle out to pasture
Perhaps the most enduring and kid-imagination-capturing metaphor of Logo programming goes like this:

[Teacher] “The turtle has a pen stuck in its belly button. What do you think happens when it drags its pen?”

[Kids] It draws!

This sounds simple, but is at the heart of what makes Logo a powerful, personal experience. Placing a transitional object representing ourselves inside of the machine is an instant personal invitation to programming. Drawing, with a crayon, pencil, or turtle is the protean activity for representing a child’s thinking.

Drawing or painting with the mouse is fine but denies children opportunities to express mathematical formalisms in service of drawing. There is fifty years’ worth of scholarship, joy, and powerful ideas associated with turtle graphics – often a user’s first experience with thinking like a mathematician and debugging.

Scratch 3.0 inexplicably demotes its pen blocks (commands) to software extensions. The extensions are hidden until the user un-hides them. All of the other Scratch 3.0 extensions support either external hardware control or more advanced esoterica like interactive video, language translation, or text-to-speech functionality. I appreciate that part of Scratch’s success is its clean design and lack of clutter. However, pen blocks are seminal and were integrated into previous versions. This design decision has several negative consequences.

  • It complicates the possible use of turtle graphics by requiring finding the location of the extensions button and clicking on the pen extensions
  • It implies that turtle graphics (drawing) is not as valuable a form of expression as animation.
  • The symbol on the extensions button is highly non-intuitive.
  • The pen blocks, once the extension is loaded, appear near the bottom of the block palettes, far from the motion blocks they rely on. This makes block programming cumbersome when the focus is turtle geometry.

The turtle has a pen stuck in its nose? Ouch!
In Scratch, the sprite draws from the perimeter of its shape, not its center. This makes precise movement, predictions about distances, and drawing precision much more difficult.

There are no turtle costumes for sprites
The turtle head points in the direction that matches “Forward” commands. This is obvious to even the youngest programmers. In Scratch, even if one wanted to use the turtle, there are no turtle costumes. Neither the turtles found in systems, like Turtle Art, MicroWorlds,  Lynx , or even the old 70s-80s era turtle  are provided. While it is possible to design your own Scratch costumes, you would be required to do so for every project, rather than merely adding sprite costumes to the system.

It is easy to explain that the “turtle may wear other costumes you design,” telling the kids that “the sprite could be a turtle that you can dress in custom costumes,” adds needless complexity.

No Clean, CG, Home, or CS
Nearly every other version of Logo has a Clean command for erasing the screen, CG, or CS for erasing the screen and repositioning the turtle at the center of the screen with a compass orientation of zero. Commonly found, HOME commands, send the turtle back to the center of the screen at coordinates, [0 0]. These are all simple concepts for even young children to quickly grasp and use.

Scratch’s pen extension Erase All block wipes the screen clean, but neither returns the sprite to home nor reorients a “dizzy turtle.”

Program for clearing the screen and sending the turtle/sprite home

Sure, if a teacher wants students to have a block performing the roles of Clearscreen, Scratch allows them to Make a Block.

The problem with doing so is that Scratch leaves the blocks you create, complete with their instructions, in the blocks palette – cluttering up your workspace. The definition of the “new” block cannot be hidden from users, even when the new block appears under My Blocks. Even more critically, there is no simple way to add pseudo-primitives (user-created blocks) to Scratch 3 for use by students each time they use the software. Therefore, you need to recreate Clearscreen in every new project.

[Making your own blocks is buggy too. Make your own block. Drag that stack of blocks, topped by Define, off the screen to delete it. Press Undo (Apple-Z or CTRL-Z). The definition stack of blocks returns, but not the new block under My Blocks until another block is created.]

The default sprite orientation is 90
When you hatch a sprite in Scratch, its orientation is towards the right side of the screen with an orientation of 90. If one hopes for children to construct understanding of compass orientation based on Mod 360, orienting the sprite/turtle to 0 is more intuitive. Since the turtle is a metaphor for yourself in space, your orientation is up, or 0 when facing the computer to program it.

No wrapping
For many kids, one of the most intoxicating aspects of turtle graphics comes from commanding the turtle to go forward a large number of steps. In many ways, it’s a kid’s first experience with big numbers. Turn the turtle and go forward a million steps and get a crazy wrapping pattern on the screen. Add some pen color changes, turns, and more long lines and math turns into art turns into math.

Scratch has no wrapping due to its focus on animation and game design. There could be a way to toggle wrap/no wrap. But alas…

Units are unnecessary
Not only are they unneeded, but educationally problematic. Far too much of math education is merely vocabulary acquisition, often devoid of actual experience. I go into countless classrooms where I find a store-bought or handmade “angles” poster on the wall listing the various kinds of angles. My first question is, “Who do you think is reading that?” The kids certainly aren’t, but more importantly, “Who cares?” Kids are forced to memorize names of angles too often without any experience with angles. Turtle geometry changes all of that.

If you watch me introduce turtle geometry to children, I show them that the turtle can walk and turn. It walks in turtle steps. I never use the terms, angle or degrees, until either kids use them or much much much later. After kids have experience with angles and a growing intuition about their units of measure will I mention the words, angle or degrees. After experience, those labels hang nicely on the concepts and the terms are understood, not just parroted.

In Scratch, the turn right and turn left blocks include the label for “degrees.” This is quite unfortunate. The design of these blocks is particularly odd since they do not even use the words, right and left, but arrows instead. This is most peculiar when juxtaposed against the rest of the motion blocks which are excessively chatty with extraneous text for their inputs.

Why use symbols for right and left and not a straight arrow for move?

To make matters worse, the default degree value in Scratch is 15. Kids naturally turn in 90 degree increments. If the default were 90, as it is in Turtle Art, kids quickly realize that there are turns smaller and larger when seeking angular precision. This is a much more effective sequence for understanding angle measurement from the syntonic to the abstract.

One tacit, yet profound, benefit of teachers teaching with Logo is that they gain experience teaching mathematics without front-loading vocabulary. In too many classrooms, kids are “taught” terms, like degree or angle, absent any experience. Logo-like environments offer the potential for teachers to appreciate how students may engage in mathematics unburdened by jargon. After children enjoy meaningful experiences and “mess-about” with the turtle, it is easy to say, “that’s called an angle,” or “the units used to measure angles are called degrees.” Those terms now have a powerful idea to hang their hat on.

Starting with units is not just unnecessary, it’s pedagogically unproductive.

Asymmetrical movement
Why are there blocks for turning right and left when there is only one move block? In Logo, Forward (FD) and Back (BK) are incredibly simple for children to understand and act out by playing turtle as a formal activity or in the course of programming. Move is ambiguous. Which way should I move? Forward and back make perfect sense.

Frankly, having a default of 10 in the move block is also a drag. For decades, teachers have experienced success by asking children, “How far would you like the turtle to go?” Kids suggest values and then are surprised by them. 10 is an arbitrary number. I might prefer 0 or a random integer as the default value for move. Such a change would force children to make a decision about the distance they wish to travel.

If you want the turtle to move backward, there is no back block. You are required to turn 180 degrees or move by a negative value.

Premature use of negative numbers
Introducing negative numbers and vectors the moment one encounters the turtle is premature and likely developmentally inappropriate. There is no reason for little kids to deal with negative numbers so soon when forward (fd) and back (bk) blocks could have been in the system, or at least as primitives under the pen extensions.

Multiple forwards provides kids practice with repeated addition, leading to multiplication.

Consider this simple example:

fd 20
fd 30
fd 100

Now you want the turtle to return to the midpoint of that line segment.

You can achieve that goal three ways, not including all of the repeated addition that might be used if a kid is not ready to divide 150 by 2 or figure out that a U-turn equals 180 degrees.

bk 75
rt 180 fd 75
fd -75

It is the possibility of solving even simple problems in multiple ways that is central to the genius of learning to think mathematically with Logo and the turtle. Sadly, the Scratch use of “move” to replace forward and back makes what was once a natural simple act, complicated or impossible.

PS: One more annoyance
Why are ask and answer in the Sensing palette? They get information from a user, but do not sense anything. Either move them or rename the Sensing palette, Data. Again, why lead the witness with the arbitrary “What’s your name?” value?

This was largely written after a recent day teaching kids. I spent months deciding whether to share this with the world. The great Cynthia Solomon contributed to my thinking and Sylvia Martinez read a draft. Seymour Papert is in my head all of the time.


  • Scratch – web site for Scratch software
  • ScratchEd – online community and resources for teachers teaching with Scratch
  • LogoThings – Cynthia Solomon’s collection of artifacts on the history of Logo
  • A Modest Proposal – ideas for using Scratch to learn computing and reading
  • Lynx – web site for new generation of Web-based Logo
  • MicroWorlds – web site for MicroWorlds software
  • Turtle Art – web site for Turtle Art software
  • The Daily Papert – archives of Seymour Papert writing, audio, and video
  • The Logo Exchange – archives of the long-running journal for Logo-using educators
  • Logo history discussion – video interview with Cynthia Solomon and Wally Feurzig, two of Logo’s creators

Selected bibliography

  • Abelson, H., & DiSessa, A. A. (1986). Turtle geometry: The computer as a medium for exploring mathematics: MIT press.
  • Harvey, B. (1982). Why logo? . Byte, 7, 163-193.
  • Hawkins, D. (2002). The informed vision; essays on learning and human nature. NY: Algora Press.
  • Newell, B. (1988a). Turtle confusion: Logo puzzles and riddles. Canberra, Australia: Curriculum Development Centre.
  • Newell, B. (1988b). Turtles speak mathematics. Canberra, Australia: Curriculum Development Centre.
  • Papert, S. (1972). Teaching children to be mathematicians versus teaching about mathematics. International Journal of Mathematical Education in Science and Technology, 3(3), 249-262.
  • Papert, S. (1993). Mindstorms: Children, computers, and powerful ideas (2nd ed.). New York: Basic Books.
  • Papert, S. (1999). Introduction: What is logo and who needs it? In LCSI (Ed.), Logo philosophy and implementation (pp. v-xvi). Montreal, Quebec: LCSI.
  • Papert, S. (2000). What’s the big idea? Toward a pedagogical theory of idea power. IBM Systems Journal, 39(3&4), 720-729.
  • Papert, S. (2002). The turtle’s long slow trip: Macro-educological perspectives on microworlds. Journal of Educational Computing Research, 27, 7-27.
  • Papert, S. (2005). You can’t think about thinking without thinking about thinking about something. Contemporary Issues in Technology and Teacher Education, 5(3), 366-367.
  • Watt, D. (1983). Learning with logo. New York: McGraw-Hill Book Co.
  • Watt, M., & Watt, D. (1986). Teaching with logo: Building blocks for learning. NY: Addison-Wesley Publishing Company.

The Papert articles (above) are available here.

Veteran educator Dr. Gary Stager is co-author of Invent To Learn — Making, Tinkering, and Engineering in the Classroom and the founder of the Constructing Modern Knowledge summer institute. He led professional development in the world’s first 1:1 laptop schools and designed one of the oldest online graduate school programs. Learn more about Gary.

Following speaking at the prestigious WISE Conference in Qatar (November 2017), Gary Stager delivered a keynote address on learning-by making at a conference held at The American University in Cairo. The video is finally available. Enjoy!

Veteran educator Dr. Gary Stager is co-author of Invent To Learn — Making, Tinkering, and Engineering in the Classroom and the founder of the Constructing Modern Knowledge summer institute. He led professional development in the world’s first 1:1 laptop schools and designed one of the oldest online graduate school programs. Learn more about Gary here.

I just received the following email from my nephew, a conscientious and excellent student currently enrolled at an East Coast university costing $68,000/year – before textbooks, etc…

The subject line in the email was PISSED

Since I know how much you love Pearson…

I’m taking a math course and an accounting course this term, each requires the completion of weekly online homework assignments. In order to gain access to these assignments, each student must make an account using a course ID so that our scores will automatically be sent to the professors, and purchase access to the e-books online. The accounting textbook is McGraw-Hill, and the math book is Pearson.

Each e-book will cost me $100, only because we are required to use these websites for our homework. I’m literally buying homework.

I thought Pearson’s death-grip on my throat was over, but alas…

Click to enlarge image

It is worth noting that all of my nephew’s other coursework thus far has been project-based and authentic.

OF COURSE, a required math course and math-adjacent “Accounting,” rely on the same-old shitty “answer the odd numbered questions” alternative to an actual productive education experience. This is not a small point.

As Seymour Papert told me, [paraphrase] “If you are not concerned that not a single progressive development in education has had an impact on ‘math,” it means ultimately that no matter what else your school does to make education relevant, there is some part of the day or week where you introduce coercion, irrelevance, and misery into the system.” This coercion is corrosive and ultimately undermines any other learner-centered efforts. As I like to say, “the weeds will always kill the flowers.”

Any good school leader knows that they can’t keep piling  new mandates on teachers and kids. Yet, few school leaders and policy makers seemingly refuse to lighten the load. Editing is critical. Less is more.

However, there is an even more pressing failure of literacy than never getting around to taking out the curricular trash. While school principals continue to ask more and more of teachers, it is the rare school leader with the courage to tell a teacher to STOP doing something.

Allow me to describe a quite common scenario. A school community decides to invest  in a more progressive, creative, or learner-centered mathematics. Curriculum kits are purchased (even the ancillary materials) and professional development juice is sprinkled on the staff.

Later that school year one cannot notice the presence of arithmetic worksheets being used during class and for homework. The worksheets were not part of the “Big Box ‘o Fun” that came with the school’s math curriculum. The teacher purchased them behind the local laundromat or downloaded them off the Web.

You ask “Why are you using all of these awful math worksheets when our school has embraced a different vision of mathematics education?” Teachers almost always answer in the same way. “I’m supplementing the curriculum.” Implied is a concern that there will be life-altering gaps in a child’s eleven times table.

Ask the same teacher if she uses the manipulatives, games, or projects that came with the textbook and she’ll reply, “Nah. No time.” There’s always time for Frank Schaffer!”

I have worked in hundreds of schools over my career and I have yet to meet a principal who will go into a classroom and say, “Stop using those worksheets.” You purchased a curriculum because you didn’t believe teachers were clever enough to know what or how to teach. Why allow them to go rogue and make decisions that do violence to children’s learning?

Leadership is not only about subtraction, but having the integrity to tell a teacher to stop doing something.

This past Fall, one of my oldest friends, veteran mathematics educator Ihor Charischak, hosted me for a Math 2.0 live webinar.

The webinar featured a freewheeling discussion about the state of math education, the role of computers in mathematics learning, school reform, constructionism, Seymour Papert, Web 2.0 and a host of other topics. If you missed the original webinar, you can watch or listen to it now and read the comments posted by attendees.

Replay the webinar

Please subscribe to my newsletter

Dear School Leaders and Policy Makers:

Our university used to boast of a 100% job placement rate for MA students with a freshly minted teaching credential. The Class of 2010 faced nearly 100% unemployment. A remarkable portion of each of my recent pre-service class sessions was dedicated to questions of employment and unemployment. That’s a shame since the only thing bigger than these wannabe teachers’ graduate school debt is their desire to improve the lives of children. Despite the wholesale debasing of teachers by the media, foundations and political leaders, I am inspired by anyone who still wants to teach and am honored to help them develop.

Apprenticeship is a powerful way to learn. That’s why future doctors and teachers intern before being credentialed. The theoretical principle at work is that you learn best through the careful emulation, collaboration and supervision of a master practitioner. I remain staggered by the remarkable impact of student teaching on candidates – for good and bad. It does not matter what my colleagues or I teach in the ivory tower of academia. Those techniques, learning theories, even deeply held values might be shelved within days of becoming a student teacher. This is commonplace when student teachers apprentice with the best educators. The results are more catastrophic when assigned to less competent, generous or inspirational teachers.

A few of my student teachers report being paired with teachers who are hostile, mean or sleepwalking. That’s unfortunate, but not half as tragic as the lessons newbies are learning from the “good” well-intentioned teachers and principals. What are young teachers expected to learn from what they observe in today’s public schools? Are good teachers being required to behave in miseducative ways based on directives from school administrators?

Here are just a few of the common scenarios being reported from the field.

  1. I asked several dozen California student teachers, “Tell me about science instruction in your school?” The nearly unanimous response was that elementary science education is a lot like Big Foot. Teachers have heard it exists, just never seen it for themselves. The Sasquatch Effect may also be applied to art, music, drama, social studies or any other meaningful pursuit not reduced to a standardized test. The innate curiosity of young children is being squelched while learning is supplanted by being taught or worse – prepped. An archaeologist would be required to find evidence of thematic units, classroom learning centers, experiments or authentic project-based learning.
  2. Principals evaluate teacher efficacy based on the volume of their students. Students are taught to be quiet, compliant and work in isolation. Elaborate time-consuming systems are enforced for eating lunch in silence, walking down the hall and playing only with children in your own class, if your school is liberal enough to still condone recess. There is zero tolerance for joy, conflict, exuberance or the expression of any other human emotion. We then have the audacity to pretend that one of the benefits of schooling is socialization. Right, anti-socialization.
  3. Math and language arts instruction has been reduced to teachers delivering a script and students chanting. Neither teacher nor student is privy to the secret logic of the seemingly infinite and random list of concepts and skills being “covered” in preparation for the test. Second graders are forced to solve worksheet problems concerning half-dollar coins even if you can’t remember the last time you saw one in circulation and the chincy manipulative kit does not include them. That’s OK, because tomorrow’s lesson will be on perimeter or from the new “algebra in-utero” curriculum. Nothing connects. There is no big picture. There’s just more instruction, more quizzes, more tests and less learning.
  4. Reading is reduced to mechanical acts or a prelude to comprehension tests. Classrooms are devoid of books, except for the basal that interrupts each boring paragraph with a quiz and compels every child to read the same thing at the same rate, regardless of their ability. Strong early readers endure years of needless phonics instruction just because while struggling readers are poked, prodded and drilled. Students receive “credit” for books they race through, but only if the school purchased the computerized quiz for that title. Reading for pleasure, information or any other intrinsic reason has gone the way of butter churning. It’s now an unpleasant unrewarding chore without the yummy creaminess. Yet, in the golden age of publishing and dynamism of the information age, we pretend to be mystified by illiteracy and low rates of independent reading.
  5. Not only has the standardization of curriculum begot test-prep and boredom, but “pacing” is its toxic spawn. Teachers are not only forced to pretend that every student is “keeping up” with whatever the pacing guide throws at them, but students are forbidden from “going ahead.” My student teachers report that teachers are punishing kids for going ahead of the sacred lesson. Some teachers make these students sit in isolation outside of the classroom if they have the audacity to express understanding of what they are being taught. Make no mistake, this obscene teaching practice is a form of child abuse and demonstrates that teachers, even the best intentioned ones suffer from Stockholm Syndrome. At best, this phenomenon demonstrates that a primary lesson of contemporary schooling is helplessness. If you act helpless, your teachers will teach that lesson to their students.

Where will one find creative teachers when agency is deprived and compliance celebrated? Every subject at every grade level could be taught in conjunction with a current event like the oil spill in the Gulf of Mexico, but by whom? When?

Five years from now, will any teachers know how to seize the teachable moment and build upon student interest or connect the curriculum to the world outside of the school?

I realize that politicians and the media are kicking your ass, but it is morally reprehensible for you to compel teachers to behave in ways that harm or inhibit the natural potential of children. Invoking the Nuremberg Defense is unacceptable. Who will stand up for the children? For your profession? For what is right?

Let’s imagine that non-traditional paths like Teach-for-America are effective and recruit the best and brightest university graduates as they promise. How many of these teacher candidates would be willing to suspend their own expression what they know about learning and allow academic content to be forced through the narrowness of the standardized curriculum?

What would you have me say to the young teacher who chokes up and testifies, “I don’t want to become like that?” (referring to the terrorized, risk-adverse, authoritarians she sees in schools as a result of the high-stakes accountability movement)

Why should a young teacher work for you? After you remove all joy, creativity, freedom and individuality from education, who will teach your child?

Originally published in the September 2000 issue of Australia’s Hotsource online newsletter

Now that most of you can be considered advanced beginners in using MicroWorlds, this issue will explore a bit more of the language and data structures available to you.

The following activity explores probability while demonstrating how sliders, text boxes and even the screen may be used to collect and report data.

Who’s for two-up?
The core of this task will be to flip a coin numerous times and record the number of times heads and tails appear.

  • Start a new project.
  • Name the turtle, coin.
  • Create two coin shapes in the shapes centre. Name one heads and the other tails. Be sure to make them appear different in some way so that the user can clearly see which one side of the coin lands faceup.
  • Change the turtle’s costui-ne to one of the coin shapes. Create a Many Times button with the instruction, flip.

Recording data with text boxes
This part of the project will flip a coin in FLIP, and change the value in the textboxes, headscount, tailscount and totalflips. If you name turtles, text boxes or sliders with unique name you may change them even ii they are on different pages. This allows you to have some action going on between the scenes.

  • Make a Startup button on the first page.
  • Create a new page from the pages menu.
  • Create text boxes named, Headscount, Tailscount and Totalflips.
  • Show the names of the text boxes so the user knows what they are reading
  • Click the Startup button
  • Type the following procedures on the procedures page.

to flip
ifelse coin = ‘heads
settotalflips totalflips + 1

to coin
if 1 = random 2 [output “heads]
output “tails

to recordheads
coin, setsh ‘heads
setheadscount headscount + 1

to recordtails
coin, setsh “tails
settailscount tailscount + 1

to startup
everyone [settext 0]

Click the flip button to start and stop the experiment. You may wish to make the flip button run many times if you want it to keep flipping the coin.

Recording data with sliders
Sliders may be used as reporters (input devices) to change the value of a variable or they may be used as indicators (output devices) displaying the current value of that reporter. Let’s experiment with sliders on a second page of our coin flipping project.

  • Create a new page from the Pages menu
  • Create two sliders ‘heads and tails, with a minimum of 0 and maximum of 300 at the bottom of the new page
  • Optional: Create buttons to switch between the two pages of our project.
  • Make the following changes to your procedures.

To recordheads
coin, setsh ‘heads
setheadscount headscount + 1
setheads heads + 1

to recordtails
coin, setsh “tails settailscount tailscount + 1
settails tails + 1

to startup
settailscount 0
setheadscount 0
settotalflips 0
settails 0 setheads 0

Type Startup to init-ialise the variables, click oA the flip button and switch between pages.

Do you see the sliders changing their values?

Extra bonus! Adding a histogram to graph our data
It is easy to add simple graphing functionality to our probability lab with the creation of two turtles and a bit more Logo programming.

  • Hatch two turtles on the same page as the sliders.
  • Name one turtle, headsgraph, and the other, tailsgi-aph (for heads graph and tails graph)
  • Place those turtles above their respective sliders.
  • Create two different turtle costui-nes consisting of blue and red horizontal bars. Name the shapes hline and tline.

Make the following changes to your procedures.

To recordheads
coin, setsh ‘heads
setheadscount headscount + 1
setheads heads + 1
headsgraph, fd 1 stamp

to recordtails
coin, setsh “tails
settailscount tailscount+l
settails tails + 1
tailsgraph, FD 1 stamp

to startup
settailscount 0
setheadscount 0
settotalflips 0
settails 0 setheads 0
headsgraph, setpos [-170 1451]
tailsgraph, setpos [200 145] page2 clean pagel

Type Startup and click on the flip button to set the experiment in action! You may even want to figure out a way to stop the graphing when a bar reaches the top. How about a textbox reporting the experimental standard deviation?

The magic of MicroWorlds’ parallelism allows the coin to be animated, text boxes to change, sliders to report and a histogram to be created all at once. You can use lots of software to generate random numbers, but no other title allows all of these things to happen at once. I am confident that you can figure out exciting ways to integrate these programming techniques into much more complex simulations and experiments.

Originally published in the September 2000 issue of Australia’s Hotsource online newsletter

LogoWriter and MicroWorlds have done so much for interdisciplinary projects that it is useful to remember that MicroWorlds can play a major role in the development of mathematical knowledge. This issue and next will explore the numerical side of MicroWorlds.

First the Boring Stuff
MicroWorlds procedures come in two categories, commands and procedures. Most Logo-users are quite comfortable with commands such as CG, FD, RT and SETC. Commands may or may not take inputs and they always produce an action. Every Logo expression (line of code) must begin with a command. This is why typing HEADING in the command centre produces the error message I don’t know what to do with HEADING. SHOW HEADING, FD HEADING, RT HEADING * 2 will all work because HEADING reports the turtle’s current orientation and hopes a command is listening. Commands may have any number of hoppers, but they never have a spout. REPEAT is an example of a two input (hopper) command.

Every one input command beginning with the prefix, SET, has a corresponding reporter with no inputs. For example:

Command Reporter
SETTEXT1 TEXT1 (where text1 is the name of a textbox)

At the core of it all
Reporters are procedures that may or may not take an input, but they always output a result. Reporters are also known as functions or operations. Reporters are absolutely essential for most mathematical and interactive MicroWorlds projects. They pass information that can be used by other procedures or turtles. Reporters may have any number of hoppers, but they always have just one spout.

It’s your call
You can write your own reporters if you remember one simple rule. Every reporter procedure contains one output. When Logo encounters the OUTPUT reporter, the procedure is terminated. To create a new reporter you need to remember the rule about OUTPUT and decide how many inputs the reporter needs. For example, if we wanted to write a procedure to double a number, we would only need one input.

to double :number
output :number * 2


to double :number
output :number + :number

Type: DOUBLE 45 in the command centre and see what happens? Why did you receive an error message?

Many people who wish to double a number would write the following procedure.

To dumb.double :number
show :number * 2

Then if they type, DUMB.DOUBLE 45 in the command centre they will get what they think is the desired result. This is the result they need only if they want to see the number 90 appear in the command centre.

Try typing the following instructions in the command centre:

Now try typing:


Our DOUBLE procedure is much more flexible and versatile than DUMB.DOUBLE.

They can speak to each other
Reporters can perform a manipulation/operation on an input and then report that result to another reporter. Logo (MicroWorlds) reads reporters from right to left since you can’t type from top to bottom. The following graphic illustrates FD ADD5 DOUBLE DOUBLE 5.

Logo is a prefix language. That means that inputs always follow the procedures. Since humans like the standard arithmetic operators (+-*/), Logo will tolerate them, but often requires parentheses for grouping. These infix reporters tend to give the turtle indigestion. Logo much prefers PRODUCT 3 4 to 3 * 4. See how SHOW DOUBLE DOUBLE 3 + 4 behaves if you add parentheses, like SHOW (DOUBLE DOUBLE 3) + 4.

Make it simple
Young children can use similar simple arithmetic reporters to leverage their own turtle graphics. For example, a child incapable of calculating twice the distance for the turtle travel could use a DOUBLE or TWICE reporter and operate algorithmically. These procedures could be written by a teacher ahead of time or by the student herself.

Operation of fractions may also be explored with simple reporters.

To 3fourths :number
output :number * 3 / 4

to 2thirds :number
output :number * 2 / 3

to 1half :number
output :number / 2

To “play with” multiplication of fractions, try typing:
SHOW 3fourths 100
SHOW 1half 100
SHOW 2thirds 3fourths 100

You may of course use these fractional reporters to command the turtle. Type the following BAR procedure on the procedure page.

To bar :height
pd repeat 2 [fd :height rt 90 FD 25 rt 90]
pu rt 90 FD 35 lt 90

See what happens if you type the following in the command centre.

BAR 100
BAR 3fourths
100 BAR 1half 100
BAR 2thirds 3fourths 100

Battle of the Functions
You can make a game out of all these arithmetic reporters. Put kids in groups of four or five and have them each contribute one new arithmetic procedure in the style of DOUBLE. They may use their own imprecise names for the reporters if they wish (as long as they can explain its function to their peers). Each kid takes turns inventing a number problem consisting of stacked-up reporters and one numerical input. The object of the game is to invent a problem that is difficult, but not impossible to solve in one’s head. Wiseguys are penalized by the rules of the game.