1 / 9

CS 360 Lab 1

CS 360 Lab 1. Professor: Krzysztof Nowak TA: Mark Boady. Lab Overview. 50 minute lab session Work in Teams (Individual submission) I need a copy of the lab for each STUDENT Grading: Written Questions are graded after submission Experimental Questions are shown and graded in class

maines
Download Presentation

CS 360 Lab 1

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CS 360 Lab 1 Professor: Krzysztof Nowak TA: Mark Boady

  2. Lab Overview • 50 minute lab session • Work in Teams (Individual submission) • I need a copy of the lab for each STUDENT • Grading: • Written Questions are graded after submission • Experimental Questions are shown and graded in class • I will sign off on all members of the team at once.

  3. Late Submission • You may submit the lab • At the end of class • In my office hours CLC (UC 147) • Thursday 12-2PM • Thursday 4:30-6:30PM • At the start of the next lab • Missed Class • If you miss class, you can make up work either in my office hours or email me to schedule a special time

  4. Grading • Professor Grades • Exam and Midterm • TA Grades • Homeworks • Quizzes • Labs • Programming Assignments

  5. Lab 1: Part 1 • Document and Test • member and insert from member-insert.scm • maxmin from maxmin.scm • msort from msort.m • Document • Write description of function in space provided on lab sheets (2-3 sentences) • Test • On tux run 2-3 tests for the function and show them to me

  6. (define (order L) (if (and (not (null? L)) (not (pair? L))) 0 (+ 1 (reducemax 0 (maporder L))))) Documentation for Order Compute the order of an object (maximum depth). The order of an atom is 0.The order of a list is 1 plus the maximum order of its elements.

  7. Lab 1 Part 1

  8. Lab 1 Part 2 • Tail and Non-Tail recursive versions of • Factorial n! • 2^n • 2^(n!) using composition function in lab • Remember you can use a helper function to make a tail and non-tail recursive have the same inputs. (define (fact_ntn) (…)) (define (fact_helpern res) (…)) (define (fact_trn) (fact_helpern 1))

  9. Lab 1 Part 3 & 4 • Range • (range (start step end)) • (define (range m) (…)) • (range ‘(1 2 10)) =>(1 3 5 7 9) • Sequence • Make use of range and map • Extra Credit Binomial • Algorithm in Lecture 2 Part 1 Slide 13 • Just rewrite in Scheme

More Related