Computational Literacies Lab

1. Imperative programming

Week 1 (August 25)

Due: 1.1. Turtle lab

👋 Welcome to LAI 676!

Notes

  • Hello, welcome!
  • About me
  • Goals for the course
    • content knowledge (learning CS)
    • pedagogical content knowledge (learning how CS is learned and taught)
  • Hardware
    • Need a real computer
  • Structure
    • Units, labs, problem sets
    • Weekly small group meetings
    • Weekly lectures
    • Weekly journal
  • How to get help
    • email me
    • attend office hours with Varun (will send out survey soon)
    • ask at your small group meeting
    • ask in the discord
  • AI - try to avoid... remember, one of the goals is to learn to code!
  • Review the syllabus

💻 Do Now

  • Make sure you have a computer you can use for the course
  • Join our class Discord server
    • Introduce yourself on Discord in the #general channel
    • Find a group who can all meet at the same time in-person or virtually
  • Get set up
  • Work on the Turtle Lab
    • due by next Monday
  • Create a journal document and share it with me (eqbrown@buffalo.edu)
  • Optional: Install Oh My Zsh for a more readable, colorful Terminal

Setup

This video guides you through the setup instructions.

Your username is your UB username - mine would be eqbrown. Your password is the first letter of your UB username and your UB ID number - for example e00234.  

Turtle Lab

This video walksthrough the Turtle lab. Feel free to watch the video or follow along with the text.

A few extra Turtle Commands

FunctionInputExample UseExplanation
forwardamountforward(100)Moves the turtle forward by the specified amount
backwardamountbackward(100)Moves the turtle backward by the specified amount
rightangle in degreesright(45)Turns the turtle clockwise by the specified angle
leftangle in degressleft(45)Turns the turtle counter clockwise by the specified angle
colorcolornamecolor('red') Sets the color for drawing. Use "red", "black", etc. Here's a list of all the colors.
speednumber from 0-10speed(0)Determines the speed at which the turtle moves around the window. 1 for slowest, 3 for normal speed, 10 for fast, 0 for fastest.
pendownNonependown()Puts down the turtle/pen so that it draws when it moves
penupNone penup()Picks up the turtle/pen so that it doesn’t draw when it moves
pensizewidthpensize(4)Sets the width of the pen for drawing
setheadinganglesetheading(90)Sets the pen to the 0th degree
circlesizecircle(10) Sets the radius of the circle
gotox, ygoto(90,0) Moves turtle to a given coordinate
begin_fillNonebegin_fill()Marks the start of the color fill
end_fillNoneend_fill()Marks the end of the color fill
fillcolorcolornamefillcolor('purple') Sets the color of the fill