tide 1022 computational thinking for work and play
play

TIDE 1022 Computational Thinking for Work and Play Jaelle - PowerPoint PPT Presentation

TIDE 1022 Computational Thinking for Work and Play Jaelle Scheuerman Carola Wenk Newcomb College Institute, Department of Computer Science Technology Services Carola Wenk, Computer Science; cwenk@tulane.edu Computational Thinking


  1. TIDE 1022 Computational Thinking for Work and Play Jaelle Scheuerman Carola Wenk Newcomb College Institute, Department of Computer Science Technology Services Carola Wenk, Computer Science; cwenk@tulane.edu

  2. Computational Thinking • Solve abstract problems using computational approaches • Write a computer program • Model the problem • Develop a sequence of instructions  Algorithm Mohammed ibn-Musa al - Khwarizmi In the 9 th century AD, he developed “algorithms” for solving linear and quadratic equations. The word “algorithm” stems from the Latin translation of his name.

  3. Algorithms Give a computational solution to a problem,  a computer program, or  a more abstract “algorithm” (list of instructions) and reason about its correctness  Prove that the algorithm solves the problem. vs. and efficiency.  Prove a certain runtime requirement.  Prove a certain space requirement. Carola Wenk, Computer Science

  4. Algorithms numbers in increasing order. Example problem: Sort n cards One straight-forward algorithm: Insertion-sort (card-player’s sort) • Incrementally process the numbers, • maintain a sorted list of numbers seen so far, and • insert the next number into the sorted list. Runtime: This generally takes roughly n 2 steps. More efficient algorithms only take roughly n log n steps. Very large data sets and complex computing environments require more sophisticated approaches. Carola Wenk, Computer Science

  5. Scratch! #include <stdio.h> Instead of int main(){ printf("Hello world\n"); } Write programs like this Go to: scratch.mit.edu Carola Wenk, Computer Science; cwenk@tulane.edu

  6. Sequential Execution Execute multiple instructions sequentially ; one after the other: Instructions have parameters that can be changed. So, each of these scratch instructions is in fact a function : move(10) play_drum(1, 0.25) Carola Wenk, Computer Science; cwenk@tulane.edu

  7. Loops One can repeat a sequence of instructions … … by copy and paste: …or by using a loop: Carola Wenk, Computer Science; cwenk@tulane.edu

  8. Events Run a script (or a sequence of instructions) when an event happened Carola Wenk, Computer Science; cwenk@tulane.edu

  9. Objects (Sprites) Each sprite has a separate script. Carola Wenk, Computer Science; cwenk@tulane.edu

  10. What does this do? Variables Make a variable that stores data: Store a value in the variable: Use the variable: Modify the variable: Carola Wenk, Computer Science; cwenk@tulane.edu

  11. Messages Coordinate between sprites by sending and receiving messages : Carola Wenk, Computer Science; cwenk@tulane.edu

Recommend


More recommend