4

My 8-year-old daughter is learning to program, and was excited to create projects using Code.org. Now she wants to design a program that creates a Babylonian number chart, with numbers from 1 to 1000, but there is no way to render such a thing with any of the visual programming environments that I know of. I've looked at Hopscotch, Tynker, Scratch, so far to no avail. She does not yet type, so switching to a text based system is not yet an option, so I'm hoping that someone else knows of a good solution.

boisvert
  • 3,679
  • 2
  • 27
  • 53
Emily Crutcher
  • 638
  • 5
  • 10
  • 1
    A lot of good coders are single fingered typists. Do not assume your daughter won't be able to pick up a text based language because she's not a typist. I don't think you have picked a trivial task either. Sometimes a coding task looks easy but isn't. I couldn't find many Babylonian number chart generators online but I did find this one: http://www.dcode.fr/babylonian-numbers – Sammy Oct 15 '15 at 03:41
  • 1
    Also be glad you have an 8 year old that's so interested in coding. I'm hoping to get my son into some visual coding through an existing interest - he's right into Disney Infinity 3.0. That has quite a complex visual programming environment built in for generating things and reacting to events. – Sammy Oct 15 '15 at 03:43
  • The converter is very cute, I will show it to her. Right now she has her heart set on creating the chart, as she likes to print out her projects, but I might be able to persuade her. Disney Infinity 3 sounds interesting, what platform is working for you? She has been reasonably happy with LearnToMod, but because of the complexity of moving in/out of minecraft, it sometimes has glitches. – Emily Crutcher Oct 15 '15 at 15:51

6 Answers6

3

Snap! is a block-based programming language based on Scratch. It lets you configure the stage size:

Configure -> Stage Size

Snap! also adds exciting functional programming features, such as anonymous functions and nested lists.

There's a tool for importing Scratch projects: https://djdolphin.github.io/Snapin8r2/

tjvr
  • 17,431
  • 6
  • 25
  • 26
0

There are two difficulties in rendering such a chart in Scratch.

1) The screen size is too small.
2) There isn't an obvious way to render the basic characters of Babylonian numbers.

The small screen size is going to be a problem in any development environment, block-based or text-based. Even using an entire 1366 x 768 pixel display, she would only have a 30 pixel square for each number. Breaking up the chart into parts (10 pages of 100 numbers each, for instance) or rendering a single number based on user input are two possible work arounds for the screen size issue.

Both of these related projects (a smaller chart or a number converter) are possible in Scratch. Your daughter will need to create a renderer sprite which can draw the symbols on the stage. A renderer sprite can either have costumes of the Babylonian symbols and use the stamp block to create combinations, or the sprite can be draw the symbols with the pen. This project has some examples of renderer sprites and how they can be used.

  • If it turns out there aren't any visual environments with larger stages, I will see if I can convince her to change her project into a number converter :-). – Emily Crutcher Oct 15 '15 at 15:42
0

The Babylonians used base 60. It appears that each numeral is composed of up to two unique sprites repeated and arranged in a base 10 paradigm.

You might want to consider an animated counter using Scratch.

  • At every tick of the clock, another right-hand "ones" sprite appears, and all disappear on the 10th tick).
  • At each 10th tick, another left-hand "tens" sprite appears (and all disappear on the 60th tick).
  • Then on the 60th ticks, a left-of-left numeral appears or updates in the 60th place.
  • To get to 1000 in base 60, you need only two numerals.
  • Somewhere else on the screen, a text field containing the decimal number tracks the ticks.

  • You could animate little Babylonians riding chariots around from ziggurat to ziggurat. (Sorry to any Babylonians if I'm making stereotypes.)

Sounds like fun, good luck.

C8H10N4O2
  • 18,312
  • 8
  • 98
  • 134
0

There should be no difficulty implementing it in Scratch. But it's a big project at 8!

  • screen size: at 4 sprites per number, 1000 numbers, 4000 characters on screen is difficult. But that is one ugly chart to display statically anyway. You could use the dynamic characteristics of a computer display to zoom the sprites very small (fitting it all into one illegible table), or large enough but incomplete, and use the arrow keys to scroll through. This is a lesson in UI: computers don't have display the size of dining-room tables, but their displays are dynamic, so use that.

The conversion is a bit of a job.

  • first, get a set of images for numbers 1-9 and 10-60.
  • create two sprites - the first with the costumes for 1-9 images; the next for 10-60.

  • to show the correct image, use switch costume.

  • I recommend that you start with smaller numbers, first up to 9, then up to 59. After that, the generic solution would be to use stamping, then shift the sprites left, change costumes and stamp again.

  • to calculate the correct values given input X:

  • units = X modulus 10

X' = X/10-units

if your number is up to 59, that's it; X' is the number of the tens costume. If not:

  • tens = X' modulus 6

X'' = X'/10-units

Start again with X''. If you want a generic solution, stamp the sprites, shift them left and calculate. Otherwise, use X'' to calculate the correct costumes of two new sprites.

boisvert
  • 3,679
  • 2
  • 27
  • 53
  • The problem is that I foolishly didn't realize the screen problem, so already had her go through the work of creating the digits via drawing them (we used a simplified version of them). Now I am faced with telling her it was all for nothing, or figuring out a way to get them to print :-) – Emily Crutcher Oct 19 '15 at 19:48
  • As you seem very familiar with Scratch, do you know of any way to call a function that saves a screenshot of the stage? As if I could dump the screenshots into a directory automatically, I could then write a program to assemble them into a printable chart... – Emily Crutcher Oct 19 '15 at 19:59
  • As an alternative to Scratch, if you have the images, you could use a different language, eg javascript (an HTML table for the output - nice and printable). Function to save a screenshot - no... But could you use scratch to show, say, 60 numbers on screen, using a loop and stamping? Only 17 screenshots.... Or, you could do it in batches of 60, but - not up to 1,000... I imagine your daughter picked it as an arbitrary, ambitious number? She might find that 480 is good enough for the show and tell? – boisvert Oct 20 '15 at 12:25
0

Pure Data is an open-source visual programming language with implementations for all the major operating systems.

Joshua Cook
  • 12,495
  • 2
  • 35
  • 31
0

This question is old but still interesting.

I think your daughter can use scratch to achieve the goal by using the "nextcostume" action associated with a sprite.

The Babylonins used base 60 meaning that we need a pair of 2 sprites to represent for 0-9 and 10,20,30,40,50,(6)0. Then we keep adding these pairs in front when the number grows larger than 59.

I did work out a poc within 30 min, including time I spent to cut/save/import the costumes.

I use the variable to show the Babylonian number count. The code is simple. By the end, 1 tricky thing is the time sync between different sprites. To make it easy, I had to manually "adjust" the early pop by adding a sound.

You can cehck out my published project here. https://scratch.mit.edu/projects/154836328/

Scratch project snapshots Costume

Ela Cai
  • 21
  • 3