CSC 121: Computers and Scientific Thinking
Fall 2023

Test 2 Review


Monday, Oct 30
3:30 - 4:30
  • Similar to the first test, this test will be conducted in-class (HLSB 244) via Blueline.
  • You are required to bring a laptop to take the test.
  • The test must be taken using the Respondus LockDown browser. Be sure to have it installed and tested before the test.
  • Also, plan to arrive early and make sure your wi-fi connection is working before the test begins.
  • 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

    There is a practice test in BlueLine with examples of each type of question.
    Note: the practice test can only be taken using the LockDown browser.
Study advice
(same as Test 1)
  • review PowerPoint slides
  • reread book chapters and chapter summaries
  • look over chapter exercises & projects, review questions
  • if desired, reference other sources for examples & different perspectives
Course Material
TEST 1 MATERIAL

History of Computers
  generation 0: mechanical (Jacquard's loom, Babbage & Lovelace, relay machines)
  generation 1: vacuum tube (COLOSSUS, ENIAC, von Neumann architecture)
  generation 2: transistor (miniaturization & mass production, high-level languages)
  generation 3: integrated circuit (mass production of complex circuitry, OS)
  generation 4: microprocessor (mass-produced calculators, Moore's Law, PC revolution)
  generation 5: ultra large-scale integration (networking, mobile, AI)
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
    multi-disciplinary fields
        Bioinformatics, Data Science
    ethics of computing
    
Experimental Methods
    Monte Carlo methods, simulations/modeling, Law of Large Numbers
Applications in Biology
    major impacts: computerized tools, modeling, information storage/retrieval

Interaction & Design
    text boxes
        input tag; id and style="text" attributes, optional size & value attributes
        examples: greetings, form letter, fill-in-the-blank story
    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: form letter, animal gallery, quotations
    design guidelines
Numbers & Computation
    JavaScript data types: strings, numbers, Booleans
    numbers & expressions
        mathematical operators (+, -, *, /)
        number box, valueAsNumber attribute
    variables to store number values and temporary calculations
        examples: tip calculator, grade calculator
    predefined functions
        Math.sqrt, Math.abs, Math.floor, Math.ceil, Math.round
        Math.min, Math.max, Math.pow
        examples: point distance, compound interest
    random numbers
        Math.random, complex expressions to adjust range of values
        example: pick4 lottery      
Functions & Libraries            
    can view functions as units of computational abstraction
    user-defined functions
        parameters, return statement
        common use: for general-purpose computations
        examples: distance conversion, simplified pick4, triangle sides 
    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