1 / 57

Welcome to SoC!

Welcome to SoC!. CS1101S or CS1010?. why are you here?. DDP folks. You can sleep. Turing Programme. Yes, you also can sleep. Scheme. Developed at MIT in 1975 to teach programming methodology. 1994. Scheme. Introduced at NUS 14 years ago. What is Scheme?. 8. (+ 5 3)

sharpm
Télécharger la présentation

Welcome to SoC!

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. Welcome to SoC!

  2. CS1101S or CS1010? why are you here?

  3. DDP folks You can sleep

  4. Turing Programme Yes, you also can sleep

  5. Scheme Developed at MIT in 1975 to teach programming methodology

  6. 1994 Scheme Introduced at NUS 14 years ago

  7. What is Scheme?

  8. 8 (+ 5 3) (- (+ 5 3) (* 2 3)) 2 prefix notation

  9. 11 (+ 5 6) (define a 5) (+ a 6) 11

  10. Scheme is Expressive (define (square x) (* x x)) To square something, multiply it by itself (square 2) (square (square 3)) 4 36 81

  11. Congratulations! You know Scheme

  12. Why Scheme?

  13. Simple (didn’t you just learn it in 10 mins? )

  14. Futile to Teach a Language (Here today, gone tomorrow)

  15. Computational Thinking

  16. Towers of Hanoi

  17. Towers of Hanoi

  18. Towers of Hanoi

  19. Towers of Hanoi

  20. Towers of Hanoi

  21. Towers of Hanoi

  22. Towers of Hanoi

  23. Towers of Hanoi

  24. Can you solve this for 1,000 discs?

  25. How would we think about the problem?

  26. What if we have one disc?

  27. What if we have no discs? Do nothing!

  28. Towers of Hanoi A B C Suppose we know how to move 3 discs from A to C

  29. Towers of Hanoi A B C Suppose we know how to move 3 discs from A to C

  30. Towers of Hanoi A B C Claim: we can move 3 discs from A to B. Why?

  31. Towers of Hanoi A B C Claim: we can move 3 discs from A to B. Why?

  32. Towers of Hanoi A B C What do we do for 4 discs?

  33. Towers of Hanoi (define (move-tower size from to extra) (cond ((= size 0) ’do-nothing) (else (move-tower (- size 1) from extra to) (print-move from to) (move-tower (- size 1) extra to from)))) from extra to

  34. Towers of Hanoi (define (print-move from to) (newline) (display "move top disk from ") (display from) (display " to ") (display to))

  35. Recursion

  36. Java CS1101S Road Map Memoization Streams ADVANCED Dynamic Programming Object-Oriented Programming INTERMEDIATE Symbolic Data Higher-Order Procedures Generic Operators List Processing BASIC Mutation & State Data Abstraction Procedural Abstraction Iteration Recursion Wishful Thinking Order of Growth Fundamental concepts of computer programming

  37. “Star Wars”RPG

  38. JFDI Academy

  39. CS1101S or CS1010?

  40. How to decide?

  41. Puke Test

  42. What is your pain threshold?

  43. Scheme vs C • Who would you marry? • Pretty but poor? • Rich but ugly?

  44. Ask your friend

  45. Ask a senior

  46. Google is your Friend “cs1101s midterm review”

  47. Why are you here?

  48. What is the meaning of life?

More Related