Introduction to Computing Science

Problem solving and programming in Python, and how computers represent information: algorithms, abstraction and the fields of computing, binary, two's complement, floating point and UTF-8, problem solving with pseudocode and flowcharts, types, variables and expressions, conditionals and boundary testing, loops, tracing, simulation and step counting, functions and recursion, strings and text algorithms, lists, tuples, dictionaries and sets with searching and sorting, files, exceptions, CSV and JSON, testing with assertions, doctests and unittest, methodical debugging and PEP 8 style, ending in a tested capstone program with academic integrity, AI assistants and privacy under FERPA and state law.

CMPUT-174 Year 1 3 credits 12 lessons · 5 h 33 min

Offered by HSM University · Computing Science

This is the American version of this course. See the Canadian version.

What you'll learn

  • Explain what computing science studies, define an algorithm by its definiteness, finiteness and correctness, use abstraction and decomposition to reason about systems, and describe the main fields of computing and their careers.
  • Convert between decimal, binary and hexadecimal, represent signed integers in two's complement and recognize overflow, explain floating-point rounding, and describe how Unicode and UTF-8, images and sound are stored as bits.
  • Apply a five-step problem-solving process, express algorithms in pseudocode and flowcharts, set up and run Python interactively and as scripts, and distinguish syntax errors, runtime errors and logic errors.
  • Use Python's core types, variables as names for objects, arithmetic and comparison operators with correct precedence, Boolean logic with short-circuit evaluation, and type conversion.
  • Write if, elif and else statements, match statements and conditional expressions, validate input with guard clauses, and test decisions with boundary values and decision tables.
  • Write while and for loops with correct initialization, conditions and updates, apply accumulator, search and nested-loop patterns, trace loops by hand, run seeded simulations and count the steps a loop takes.
  • Define functions with parameters, return values, defaults and docstrings, explain local scope, decompose problems top-down into small functions, and write simple recursive functions with base cases.
  • Index, slice, search, clean and format strings, explain string immutability, and implement classic text algorithms including word counting, palindrome checks, a Caesar cipher and input validation.
  • Choose and use lists, tuples, dictionaries and sets, explain aliasing and copying, write list comprehensions, and compare linear search, binary search and selection sort by counting comparisons.
  • Read and write text, CSV and JSON files safely with explicit encodings, handle and raise exceptions appropriately, and build a read, clean, compute and write data pipeline that reports rejected data.
  • Test programs with assertions, doctests and unittest using systematically chosen cases, debug methodically with hypotheses and experiments, and develop readable code incrementally following PEP 8.
  • Design, implement and test a complete small program, follow academic integrity and AI-assistant policies, apply privacy principles under FERPA, sector laws and state privacy laws, and consider fairness, accessibility and next steps in computing.

Course content

12 lessons · 5 h 33 min total · final exam

  1. 1 What computing science is 29 min · quiz
  2. 2 How computers represent information 29 min · quiz
  3. 3 Algorithms and programs 28 min · quiz
  4. 4 Values, variables, expressions and types 26 min · quiz
  5. 5 Control flow: conditionals 26 min · quiz
  6. 6 Control flow: loops 28 min · quiz
  7. 7 Functions and decomposition 27 min · quiz
  8. 8 Strings and text processing 26 min · quiz
  9. 9 Lists, tuples, dictionaries and sets 29 min · quiz
  10. 10 Files, exceptions and data 28 min · quiz
  11. 11 Testing, debugging and program design 28 min · quiz
  12. 12 Capstone: a complete program, computing ethics and next steps 29 min · quiz
  13. E Final exam 20 questions

Description

Problem solving and programming in Python, and how computers represent information: algorithms, abstraction and the fields of computing, binary, two's complement, floating point and UTF-8, problem solving with pseudocode and flowcharts, types, variables and expressions, conditionals and boundary testing, loops, tracing, simulation and step counting, functions and recursion, strings and text algorithms, lists, tuples, dictionaries and sets with searching and sorting, files, exceptions, CSV and JSON, testing with assertions, doctests and unittest, methodical debugging and PEP 8 style, ending in a tested capstone program with academic integrity, AI assistants and privacy under FERPA and state law.

Part of the Science stream, typically taken in year 1.