Thursday, December 14, 2006

Programming with Logo - interaction

It's time to get the turtles interacting with each other. Suppose your frog breed wants to eat the bug breed? How do you breed frogs? Here's some sample code that initially creates 2 frogs and 100 bugs. When a frog comes in contact with a bug, it eats (kills) the bug. I've left a red patch where this event occurs. When 2 frogs come in contact with each other, another frog will hatch.

New commands & techniques
count-breed-here
Returns the number of turtles whose breed is breed which are on the current patch. For example if count-frogs-here > 2 [setc blue] makes the turtle set its color to blue if there are more than two turtles of type frog on its current patch.

ask-breed [list of commands]
Asks all turtles of breed to run [list of commands]. The observer will wait for all of the turtles to finish before continuing.

die
Turtles die, meaning that they stop running all code and disappear forever.

hatch [list of commands]
Make an exact copy of a turtle, including turtles-own variables and state variables. The [list of commands] is then run on the cloned turtle.


Observer procedures
breeds [frogs bugs]

to setup
cg
ct
create-bugs-and-do 100 [setshape termite-shape setc yellow rt 30 jump 7]
create-frogs-and-do 4 [setshape frog-shape setc green]
end

to movebugs
ask-bugs [move-bugs]
end

to movefrogs
ask-frogs [move-frogs]
end

Turtle procedures
to move-bugs
loop
[
seth random 360 fd 1
if (breed = bugs) and (count-frogs-here = 1) [stamp red die]
]
end

to move-frogs
loop
[
seth random 360 fd 3
if (breed = frogs) and (count-frogs-here = 2) [hatch [move-frogs]]
]
end

Thursday, November 30, 2006

Programming with Logo - Breeds

Programming with Logo - Logic

Now that we've created turtles and moved them around, let's see if we can interact with the environment (called the patch environment). We'll need to learn how to program some logic.

Goal: Keep turtle(s) trapped in a square

Monday, October 30, 2006

Programming with Logo - the basics

Let's start by programming a virtual robot. Create a detailed list of instructions for getting your robot from the parking lot to sitting down at a computer in the classroom. [source]

We're going to use StarLogo to learn about and use programming concepts and programmable modeling environments.

Cast of Characters
Turtles: The objects that you control with your programming. Each turtle has a position, heading, color and pen. You can add more specialized traits and properties.

Patches. The piece of the world in which the turtles live. Like turtles, patches can execute StarLogo commands, and they can act on turtles and patches. Patches are arranged in a grid, with each patch corresponding to a square in the Graphics area.

Observer. The observer "looks down" on the turtles and patches from a bird's eye perspective. The observer can create new turtles, and it can monitor the activity of the existing turtles and patches.

Interface
Control Center - Observer. Type commands that can be executed by the observer, eg. clearturtles (ct) and cleargraphics (cg)

Control Center - Turtle. Type commands that will affect the turtle(s), eg. forward 10 (fd 10), right 90 (rt 90)

StarLogo Window. Includes the Graphics area which is the patch where the turtles live. The white area to the left of the Graphics area is the Interface area, where you can create buttons, slides, and monitors that interact with your program.

Commands to build a square
clear-turtles or ct
Erase all turtles (observer command)

clear-graphics or cg
Erase graphics (observer command)

create-turtle number or crt
Create turtles, you can create as many turtles as you want by specifying number (observer command)

forward number or fd
Moves turtle in the direction of its heading the number of steps specified.

right degrees or rt
Rotates the turtle clockwise the number of degrees specified. Remember turning right or left is from the turtle's perspective

left degrees or lt
Rotates the turtle counterclockwise and number of degrees specified.

To create a square
In the observer command center type:
ct
crt 1

In the turtle command center type:
fd 10
rt 90
fd 10
rt 90
fd 10
rt 90
fd 10
rt 90

More turtle commands
repeat number [list of commands]
Repeats the commands in the brackets the number of times specified. For example, to make a square type:
repeat 4 [fd 10 right 90]

back number of bk
Moves the turtle in the opposite direction it is heading the number of steps specified.

pendown or pd
Causes the turtle to draw when it moves.

penup or pu
Causes the turtle to move without drawing.

setcolor colorname or setc
Sets turtle(s) color to colorname.

Challenge: Create a green square

complete command list

Friday, October 06, 2006

network admin resources

http://www.tomsnetworking.com/2004/04/14/how_to_wds_bridge/page9.html

Monday, October 02, 2006

Create a brochure

You'll be creating a brochure for Maria's. Things to think about:

layout
The first thing you will do is use pencil and paper to roughly sketch the layout of your brochure. Identify where you want to place images & text. Identify the content you will need to create to go into the brochure:
- front cover: visually appealing for your target audience, usually includes logo & tagline
- inside front panel: summarize why a customer should choose your store
- inside three panel spread: summarize info about your store, provide key product info
- back cover: contact info

images
The use of images is important in a brochure. Think about using a store image, key product images, & clipart. Balance the use of images and text. Ensure that you do not use copyright protected images.

tag line
This is an easy to remember slogan that sums up the store philosophy. Examples of tag lines include: just do it (Nike), must see TV (NBC), always low prices (WalMart), when it absolutely has to get there overnight (FedEx)

fonts
It is important to use fonts consistently in a brochure. Probably no more than 3 fonts should be used and you'll want to ensure that they are legible in print.

Resources:

tri-fold brochure templates
trifold brochure writing tips
free stock images

Wednesday, September 20, 2006

Create a spreadsheet – part 1

Lesson goals:

  • Enter data into a spreadsheet
  • Understand the concept of rows, columns, and cells
  • Create a bar chart
  • Create a formula

1. Start Appleworks and select Spreadsheets.

2. Put a header in the spreadsheet with your name and today’s date. Select Format and Insert Header.

3. Enter the following data into the spreadsheet, starting with titles in row 1.

Adult animals

Lowest weight

Highest weight

Gray wolf

55

155

Coyote

25

50

Red fox

8

15

Fennec fox

2

4

Dingo

20

40


4. Select Edit and then Select All.

5. Select Options and then Make Chart.

6. Select Bar from Gallery and then OK.

7. Chart should appear in spreadsheet. Move it under your data.

8. Update the Dingo’s lowest weight to 25 and highest weight to 50. See how the chart automatically updates.

9. Add a column, by entering the title “Mean weight” into cell D1.

10. Select cell D2 and type the formula to determine the average weight of the gray wolf. Type exactly the following into the cell:

=(B2+C2)/2

11. Copy the formula from cell D2 to D3.

· Select cell D2 and select Edit & Copy.

· Select cell D3 and then select Edit & Paste Special. Select Paste Values & Formulas then select OK.

12. Repeat step 11 to copy the formula to cells D4, D5 & D6.

13. Update chart to include Mean weight column. Double-click on the chart. Select General. Edit Chart Range - change C6 to D6 and OK.

14. Update the Dingo’s lowest weight to 30 and highest weight to 65. See how cell D6 automatically recalculates and chart updates automatically.

Create a spreadsheet – part 2

Lesson goals:

  • Enter data into a spreadsheet
  • Understand the concept of rows, columns, and cells
  • Choose an appropriate graph
  • Create a spreadsheet from scratch
  • Create a formula

1. Start Appleworks and select Spreadsheets.

2. Put a header in the spreadsheet with your name and today’s date. Select Format and Insert Header.

3. Enter the following data into the spreadsheet, starting with titles in row 1.

Age

1990

2000

Under 5 years

443,155

461,982

5 to 9 years

424,361

395,084

10 to 14 years

398,531

495,955


4. Select Edit and then Select All.

5. Select Options and then Make Chart.

6. Experiment with different chart types from the Gallery, which type is the best to display this data?

7. Go to the web site U.S. Census Bureau Kids' Corner @ factfinder.census.gov/home/en/kids/kids.html and find the population facts for the state of Virginia. Find out the correct population number for kids age 5 to 9 years in the year 2000 and update your spreadsheet. See how the chart automatically updates.

8. Add a column to calculate the change in population from 1990 to 2000. Use formula =C2-B2.

9. Add this column to your chart by double-clicking on the chart. Select General. Edit Chart Range - change D3 to D4 and OK.

10. Save your work on your memory stick.

11. Create a new spreadsheet.

12.Use the U.S. Census Bureau Kids' Corner to create a spreadsheet that compares the population trends from 5 different states for the 10-14 year category between 1990 & 2000. Remember to provide a title row.

13. Create a chart from this data. Which chart type is the best to display this data?

14. Add a column to calculate the increase or decreases in population between the 2000 and 1990 numbers. Create a formula that will calculate this for you.

15. Add this column to your chart.

16. Save your work on your memory stick.

Wednesday, September 13, 2006

keyboarding

This year we are trying out Learn2Type for Schools. It provides online access to keyboarding exercises as well as recording student progress online. We are using the free version, which will have some ads and we'll just need to see how annoying that is. A username, password, and class id are required to login.

Other online resources for keyboarding:

internet searches

Online Search Tips
  • Use as many keywords as possible to narrow down the results, but don't include articles like the, an, and.
  • If you don't find a useful website on the first page of results, you didn't provide the appropriate keywords.
  • If you want to type in a key phrase (more than one word) and have the search engine look for those words together, put them in quotes.
  • Once you have found a page, use your browser's Find feature to find a specific word on the page you are looking for.
  • A search engine, like Google, gathers results from all over the web without verifying it's validity or appropriateness. Therefore you are more likely to get junk in your results that you will need to filter out.
  • A directory service, like Ask Jeeves or Yahoo, gathers results from the web based on a list of sites it has approved. Therefore you may get fewer results, but hopefully more on topic.
  • A wiki, like wikipedia, is a collection of text and photos, nearly all of which can be visited and edited by anyone at any time. Therefore a wiki may have lots of information about some topics and little on others. Because it can be edited by anyone, you may need to validate information with other sources.
  • Do not copy and paste information from a website into your project. This is plagarism. Put the information you learn into your own words.
  • You always want to cite your sources, including websites where you learned information or found an image. Google is not a source, it is a search engine. The source is the web address where you found the information.
Keyword Challenge

Query Checklist
Use this checklist to build an optimal query


Search Challenges

Tuesday, September 12, 2006

internet safety

I always start the year by covering the topic of internet safety. There are many good resources online. I have created a safe user contract "borrowing" some good ideas from the local public school system. I review each item with the students and ask them to sign and take home for their parents to sign. I really want to get parents involved in the discussion of internet safety with their kids.

I also had the students go through Disney's Surf Swell Island safety quiz. It's really goofy (pun totally intended), but the kids get a kick out of it and it actually covers a lot of good info. Other good safety websites include: