Racket Programming: Autumn 2015 Course Information and Exercises

cse 341 programming languages n.w
1 / 8
Embed
Share

Explore the details of the Racket programming course in Autumn 2015, including TA information, setup guide, exercises, reminders, and more. Get insights into programming with Racket through practical examples and function reminders.

  • Racket Programming
  • Autumn 2015
  • Exercises
  • Course Information
  • TA Information

Uploaded on | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. CSE 341 : Programming Languages Section 1 Hello Racket! Autumn 2015

  2. Hello! Your TAs are James Barnes (jbarnes7 at cs) Section AA: Thurs 12:30pm-1:20pm MGH 284 Office Hours: Mon 12:30-1:20, CSE 002 Dylan Swiggett (swiggd at cs) Section AB: Thurs 1:30pm-2:20pm EEB 031 Office Hours: Tues 12:30-1:20, CSE 002 Justin Adsuara (justbads at cs) Section AC: Thurs 2:30pm-3:20pm SAV 130 Office Hours: Thurs 3:30-4:20, CSE 002 Ben Tebbs (bentebbs at cs) Office hours by appointment 2

  3. Racket Setup guide on the course web, options: @ Home: download DrRacket (6.2.1) Labs have the software now (Linux & Windows) Important features: Run Debug Check Syntax Questions? 3

  4. Exercises (from class) Questions? Questions? 4

  5. Exercises 1. (/ 1 0.0) 2. (+ 3 (abs (- 1/2 1)) 3. (let* ([x 0.5]) (let ([y 1] [z x]) (let ([z y] [y z]) (+ x y z)))) 5

  6. Exercises List reminders length -- length of a list equal? -- test if two lists are equal (recursively) car -- first element of a list cdr -- rest of a list cons -- make a new list cell (a.k.a. cons cell) list -- make a list Examples: (equal? (x) (x)) => error! x is unknown function (equal? '(x) '(x)) => #t (cons 'x '(y z)) => '(x y z) (cons 'x '() ) => '(x) (car '(1 2 3)) => 1 (cdr (cons 1 '(2 3))) => '(2 3) 6

  7. Exercises Function reminders Anonymous (lambda (x1 x2) (* (- x1 x2) (- x1 x2))) Named (define square-diff (lambda (x1 x2) (* (- x1 x2) (- x1 x2)))) (define (square-diff x1 x2) (* (- x1 x2) (- x1 x2)))) OR [syntactic sugar] 7

  8. Homework questions? 8

Related


More Related Content