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: MWcybercourse@xxxxxxxxxxxxxxx
Subject: Re: Morse Code
From: "Daniel Ajoy" <dajoy@xxxx>
Date: Tue, 26 Feb 2002 15:56:12 -0500

On 26 Feb 2002 at 12:35, Gary McCallister wrote:

> A couple of weeks ago I posed a problem about wrapping. 
> The situation was a student wanted to type in Morse Code. 
> he wrote that but was having problems making the turtle act
> like a carriage return on a typewriter

'Thought about this for a while but didn't take the time
to make a project and post it. I do it now.

The key of the the nextpos.mw2 project is the use of int and 
remainder.

As :count increases, this table shows the values of intermediate
results for setx and sety:

:count remainder :count :columns :step * remainder :count :columns setx
------ ------------------------- --------------------------------- ----
0 0 0 -260
1 1 30 -230
2 2 60 -200
3 3 90 -170
4 4 120 -140
5 5 150 -110
6 6 180 -80
7 7 210 -50
8 8 240 -20
9 9 270 10
10 0 0 -260
11 1 30 -230
12 2 60 -200
13 3 90 -170
14 4 120 -140
15 5 150 -110
16 6 180 -80
17 7 210 -50
18 8 240 -20
19 9 270 10
20 0 0 -260
21 1 30 -230
22 2 60 -200
23 3 90 -170
24 4 120 -140
25 5 150 -110
26 6 180 -80
27 7 210 -50
28 8 240 -20
29 9 270 10
30 0 0 -260
31 1 30 -230
32 2 60 -200


:count int (:count / :columns) :step * int (:count / :columns) sety
------ ------------------------- --------------------------------- ----
0 0 0 -260
1 0 0 -260
2 0 0 -260
3 0 0 -260
4 0 0 -260
5 0 0 -260
6 0 0 -260
7 0 0 -260
8 0 0 -260
9 0 0 -260
10 1 30 -230
11 1 30 -230
12 1 30 -230
13 1 30 -230
14 1 30 -230
15 1 30 -230
16 1 30 -230
17 1 30 -230
18 1 30 -230
19 1 30 -230
20 2 60 -200
21 2 60 -200
22 2 60 -200
23 2 60 -200
24 2 60 -200
25 2 60 -200
26 2 60 -200
27 2 60 -200
28 2 60 -200
29 2 60 -200
30 3 90 -170
31 3 90 -170
32 3 90 -170



Daniel

Attachment: nextpos.mw2
Description: Binary data


  • Previous by thread: Re: Morse Code
  • Next by thread: RE: Morse Code

  • 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