RU beehive logo ITEC dept promo banner
ITEC 109
2014spring
ibarland

homeinfolabsexamshws
D2LMediaSamples/breeze (snow day)tutor/PIs

lab23-hw03-review
hw03 review

Today we reviewed hw03-soln. Overall good (those who attempted all problems). Biggest concept: when you turn a sequence of expressions into a function, the parameter is no longer (also) a top-level variable. It is a best a confusion (at worst a fundamental confusion) about how parameters work. (We also saw this with the turtle speedy, vs. naming a parameter speedy; a better paraemeter name would be “t” if it can hold any turtle that the function is given.

Also, we compared

drawSquare(pokey,10*1)
turn(6)
drawSquare(pokey,10*2)
turn(6)
drawSquare(pokey,10*3)
turn(6)
drawSquare(pokey,10*4)
turn(6)
drawSquare(pokey,10*5)
turn(6)
# 
with, as a sneak preview of loops:
for i in range(30):
  drawSquare(pokey,10*i)
  turn(6)

homeinfolabsexamshws
D2LMediaSamples/breeze (snow day)tutor/PIs


©2014, Ian Barland, Radford University
Last modified 2014.Mar.19 (Wed)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Powered by PLT Scheme