All courses

College · Computing

Introduction to Computer Science

Learn to break problems into clear steps, write small programs, and test whether your solutions work.

What you will learn

  • Describe an algorithm before translating it into code.
  • Use variables, conditions, loops, and functions in small programs.
  • Organize simple collections of data.
  • Find errors by tracing, testing, and reading feedback.
  • Discuss how computing choices affect privacy, fairness, and accessibility.

Common challenges

  • A program must be precise

    Computers follow instructions rather than guessing your intent. Trace one small example by hand and check each value as it changes.

  • Independent projects take planning

    College programming work can take longer than expected and may have fewer checkpoints than high school assignments. Start early and build one working piece at a time.

  • Errors feel personal

    An error message is information about a program, not about your ability. Reproduce the problem, read the message, and test one possible cause.

  • Help versus copied work

    Follow the instructor's collaboration and AI rules. You should be able to explain and change every part of the code you submit.

Key concepts

Algorithm
An algorithm is a precise sequence of steps for solving a class of problems. For a given task, it needs clear inputs, outputs, and stopping behavior.
Variables and types
A variable refers to a value that a program can use. A value's type affects which operations make sense, such as numeric addition versus text joining.
Control flow
Conditions choose among paths, and loops repeat work. Tracing control flow helps explain why a program reaches a particular result.
Functions and abstraction
A function packages a task behind a name and interface. Abstraction lets you reason about what a component does without tracking every internal detail at once.
Data structures
Data structures organize values for different uses. A list keeps items in an order; other structures support different ways of finding and combining information.
Testing and debugging
Testing compares actual behavior with expected behavior on chosen cases. Debugging finds and fixes the causes of incorrect behavior; passing a few tests does not prove all cases work.

How to prepare

  • Practice writing exact steps for a simple task, including unusual inputs.
  • Review basic algebra, comparisons, and logical statements such as and, or, and not.
  • Learn to create folders, save files, and find file extensions on your computer.
  • Check the course's programming language and setup instructions instead of assuming every class uses the same tools.

Study habits that help

  • Write a tiny example and expected answer before writing code.
  • Trace changing variable values in a table when a program surprises you.
  • Add and test one small feature at a time.
  • Keep a bug log describing the symptom, cause, and fix in your own words.

What to expect

Typical workload
Heavy
Time outside class
Typically about 6–10 hours outside class weekly, with longer project weeks; college, instructor, and prior experience affect the time needed. A general college rule of thumb is about 2–3 study hours outside class for each hour in class.
Pace
Small exercises often lead into larger programs, and later tasks reuse earlier programming ideas.
How it is usually graded
Courses typically combine programming assignments, labs, quizzes, exams, and sometimes projects, considering correctness, clarity, and testing.

Skills that help

  • Breaking down problems
  • Logical reasoning
  • Testing systematically
  • Explaining solutions

What teachers usually expect

  • Start assignments early enough to ask specific questions.
  • Test ordinary, boundary, and unusual cases.
  • Follow collaboration policies and submit code you understand.

Before you start

  • Many introductory courses welcome students without coding experience but commonly expect algebra readiness; some sequences require placement or an earlier course.
  • A survey course may differ from the first programming course for majors; prerequisites differ by college, so check the college catalog.

These are general descriptions of a typical course. Workload, pace and prerequisites differ by school and instructor, so check with your counselor, advisor or the course catalog.

How it connects to majors

  • Computer science
  • Software engineering
  • Data science
  • Information systems
  • Computational science

Flashcards

Card 1 of 10

Practice questions

Question 1 of 6

In this pseudocode, x starts at 2. The next instruction is x ← x + 3. What is x afterward?

Vocabulary

Algorithm
A precise procedure for solving a problem.
Variable
A name or reference a program uses to access a value.
Boolean
A logical value representing true or false.
Conditional
An instruction that selects behavior based on a condition.
Loop
A structure that repeats instructions.
Function
A named unit of code that performs a task, often using inputs and producing a result.
Debugging
Finding and correcting the causes of a program's incorrect behavior.
Abstraction
Representing essential features while setting aside unnecessary detail.