Admin

Problems 1 - 10

1/16  Basic Racket Expressions 

  •  Ex 1-3 video
    • 1 - copy the definitions for x & y. Write the mathematical formula (expression) in Racket. Change x and y to 5 and 12, and the expression should then give you 13.
    • 2  if prefix or suffix is changed, your answer should change.  Example (define prefix "small") would give "small_world"
    • 3 Cut the string at the i position. IMPORTANT! If i is changed, the strings will be cut at a different position! Then rejoin with the "_" between them.
  •  Ex 4-6 video
    • 4 Almost the same as #3. However, when you cut the string, cut up to the letter that you don't want. For the second string, cut just past the letter that you don't want.
    • 5 create simple pictures, that a 4 year old would identify as a car, tree, & boat. This tree is a bit fancy.  A simple green triangle is fine.

    As you work through the problems you should keep your created images simple.

  • images - overlay and overlay/xy video


1/18  Images, booleans, branching, and nested branching

  • exercises 1 - 5 due
    • 6 Recall that images are rectangles and the area of a rectangle is .... 
  • 7  Here is an alternate problem that you can use (but you can also use the one in the book)

(define  weekday  true)
(define  vacation  true)
Write an expression that will correctly identify if the person can sleep in.
Answering the following question may help you.

      You can sleep in if ... weekday ... vacation...   [ use two of the following:  and  or  not ]

There are four possible combinations of boolean values for this problem and the expression should give the correct answer for any of these combinations.

Ex. 7 video
Ex. 7 alternate problem Video  (sleep-in  vacation  weekday)


1/22

Predicates 

  • 8  write two expressions for this problem; one that gives "tall" "not tall" and the second that gives "tall" "wide" or "square"

nested if part 1 (vote or can't vote)   (number is positive, negative, or zero)

nested if part 2 (traffic light : red, green, yellow)   (gravel : large, medium, small, sand )

if video - one example  (minor, vote, drink)


1/24

  • 9  test (change) in to the following cases (solutions):
    • (define in "scrumptious")  11
    • (define in  (rectangle 20 10 "solid" "red"))  200
    • (define in  (circle 10 "solid" "green"))  400
    • (define in  17)  16
    • (define in  23)  22
    • (define in  0)  0
    • (define in  -5)  -5
    • (define in  #true)  10
    • (define in  #false)  20

 

 

 

Website by SchoolMessenger Presence. © 2018 West Corporation. All rights reserved.