Monday, October 4, 2010

Estimate the area

color yellow
rect 0,0,300,300
color red
rect 0,0,20,20
h=int(rand*5)+1: l=int(rand*5)+1
rect 40,40,40+20*l,40+20*h
input "The small square is 1 cm^2 what is the area of the rectangle?",q$
color yellow : rect 40,40,40+20*l,40+20*h
color red
for s = 0 to h+1 : for n = 0 to l+1
  rect 40+20*n,40+20*s,19,19
  print a
next n : next s

No comments:

Post a Comment