CSC 121: Computers and Scientific Thinking
Spring 2021

Test 2 Review


Tue, Apr 6
11:00 - 12:00 (CDT)
  • The test will be conducted in-class (Harper auditorium) via Blueline.
  • You are required to bring a laptop to take the test. Be aware: there are no desktops in the auditorium seats.
  • The test must be taken using the Respondus LockDown browser. Be sure to have it installed and tested before the test.
  • It is closed-book and closed-notes.
Types of questions
(same as Test 1)
  • factual knowledge: TRUE/FALSE, multiple choice
  • conceptual understanding: short answer, discussion
  • synthesis and application: describe/modify HTML page
Study advice
(same as Test 1)
  • review PowerPoint slides and/or lecture recordings (if not mentioned in class, won't be on test)
  • reread book chapters and chapter summaries
  • look over chapter exercises & projects, review questions
  • reference other sources for examples, different perspectives
Course Material
TEST 1 MATERIAL

Scientific & Computational Thinking
   history of science
       Greek pre-science, Islamic empire, Dark Ages, Renaissance, Scientific Revolution
   scientific method: observe, hypothesize, design, experiment, analyze
       experimentation, reproducability, consistency vs. accuracy
   computational thinking
       decomposition, pattern matching, abstraction, algorithms
       examples: algorithms for finding oldest person (simple vs. efficient)
Algorithms & Programming
    real-world algorithms
    algorithm analysis, rate of growth, Big Oh notation
        examples: sequential search vs. binary search, Newton's algorithm
    machine language vs. high-level language
        program translation: interpreter vs. compiler
Computer Science as a Discipline
    study of computation, artificial vs. natural science
    CS themes: hardware, software, theory
    subfields of CS
        Algorithms & Data Structures: public-key encryption
        Architecture: parallel processing, multicores
        Operating Systems & Networks: Ethernet, WiFi
        Artificial Intelligence: Turing Test, neural networks
    ethics of computing
Applications
    Biology: computerized tools, modeling, information storage/retrieval
    Artifical Intelligence: expert systems, neural networks, genetic algorithms
    Data Science: big data, supervised vs. unsupervised learning
    
Experimental methods
    Monte Carlo methods, simulations/modeling
    Law of Large Numbers
    consistency vs. accuracy

Interaction & Design
    text boxes
        INPUT tag, ID and style="text" attribute, optional SIZE & VALUE attributes
        examples: form letter, fill-in-the-blank story
    design guidelines
    user-defined functions
        used to simplify the BODY, move action code to the HEAD (in a SCRIPT element)
        function definition: function FUNC_NAME() { ... }
        function call: FUNC_NAME();
        examples: simplified version of form letter, quotations page
Numbers & Computation
    JavaScript data types: strings, numbers, Booleans
    numbers & expressions
        mathematical operators (+, -, *, /), parseFloat function
        variables to store number values and temporary calculations
        examples: tip calculator, grade calculator
    embedded counters
        used to count how often an event (e.g., mouse click) occurs
    predefined functions
        Math.sqrt, Math.abs, Math.floor, Math.ceil, Math.round
        Math.min, Math.max, Math.pow
        examples: bit values, pick4 lottery
    programming errors & debugging
        syntax error, run-time error, logic error       
Randomness & libraries            
    can view functions as units of computational abstraction
    Math.random
        no inputs, returns random number from [0...1)
        can multiply to expand range, add to shift range, use Math.floor to get integer
    user-defined functions
      parameters, return statement
      common use: for general-purpose computations
      examples: simplified pick4 page, distance page
    function libraries
      SCRIPT tag with SRC attribute to specify library file name
      common use: for collections of functions that may be reused
      random.js library 
        RandomNum, RandomInt, RandomChar, RandomOneOf library functions
        examples: dice, random sequence generator, Oracle of Internet