CS 151 Introduction to Computer Science

From Computer Science
Revision as of 19:45, 17 May 2021 by Znoble1 (talk | contribs) (CS 151 Introduction to Computer Science)
Jump to: navigation, search

Catalog Description

History of computers and computer science, principles of process description, and problem analysis. The basic structures of sequence, iteration, and selection. Programming style, artificial intelligence, current applications.


  • None

Standard Content

Course Outline

  • Using unix - getting around in the shell, dealing with files and text editors.
  • Making directories / folders, what are they?
  • Making and editing files, what are they?
  • Unix file permissions, ls -l output decoding
  • Wild-cards (at least * and ~)
  • List of required commands: passwd, chfn, man, ls, cp, mv, rm, mkdir, rmdir, chmod and some editor, ssh/scp/rsync?
  • Using the 151check program and auto-checking their assignments
  • HTML and CSS
  • Basic HTML elements: html/head/body, lists, tables, textual formatting
  • Basic CSS styling: selectors, box model properties, colors, fonts
  • Probably will deprecate this portion of the class or move to the end if doing ES in the browser examples.
  • Used as a lighter introduction to files and editing
  • ECMAScript programming:
  • Data-types:
  • Numbers: Integers/Floats, Bases, formatting, comparing, min-max
  • Strings: comparing, searching, more emphasis on what is a character?
  • Arrays (Some on objects), min-max element, searching/sorting
  • Common methods for the above data-types.
  • Using command line parameters
  • Console output, some formatted output
  • Variables and scope
  • Conditionals:
  • if, if-else, if-else chaining
  • Simple Boolean logic: NOT, AND, OR, Boolean expressions
  • Switch?
  • Functions and methods, method-chaining
  • Loops:
  • while, do-while and for loops.
  • Nested loops
  • Iteration over arrays/objects with for-in / for-of
  • Dealing with some file-data (strings/characters or JSON encoded arrays)
  • Algorithms:
  • Comparing and counting things
  • min-max of 2/3/4 elements, finding second largest/smallest
  • Searching: linear search then later binary search
  • Sorting: insertion and selection sort
  • Caesar cipher encryption?
  • Arrays as stacks/queues: push/pop, shift/unshift operations
  • Math:
  • Bases - converting to/from binary and decimal, Hexadecimal and Octal
  • Summation
  • Modulus arithmetic
  • Bases
  • Some functions: min/max, floor/ceil, abs, pi, sin, cos

Learning Outcomes

  • Ability to use Unix at the command line.
  • Basic understanding of files and directories
  • Can take a specification and produce code implementing it.
  • JavaScript (ECMAScript) programming and debugging
  • Understanding of primitive data types and basic Boolean logic
  • Basic programming concepts such as scope, functions, conditionals and loops.
  • Simple algorithms for searching and sorting and simple mathematical concepts as they relate to programming such as numeric bases, summation and modulus arithmetic.

Important Assignments and/or Exam Questions

  • Using Unix - copying, creating files and directories, using a text editor.
  • Hello world - creating a basic program and getting it to run.
  • Unit conversion - converting between degrees/radians, etc.
  • Looping and iteration over some datum - summation, min-max finding
  • 2 dimensional data and nested looping - making a multiplication chart
  • Data validation - ask for phone number and check that what they typed is valid. Also for other types of data (e.g., email address, age, …). (students have great difficulty with this type of problem.)
  • Caesar cipher encryption/decryption (playfair setup, but not called that)
  • Interactive programs?
  • Auto-testing has difficulty with anything random.

Standard resources

  • W3Schools
  • Mozilla Developer Network (MDN)
  • Tutorials Point