Computer Fundamentals and Introduction to Programming · Prerequisites

Prerequisites for Computer Fundamentals and Introduction to Programming

The course does not expect any programming experience. This page collects the everyday computer skills and school mathematics on which the 21 presentations in the 12 chapters rest. Each topic card says what you should know, in which presentations it is used, and has two short self-check questions. The details open with the Details and self-check button, and clicking a question shows its answer.

The essential core. Typing accurately and being able to find your files, the four operations with integer quotient and remainder (/ and %), percentages and averages, using letters in place of numbers, and/or/not, and following steps in order. Java itself is taught from scratch in Chapter 5. If something here is missing, a short review in the first weeks is enough.

Terms. The terms used in the slides are collected in the course glossary.

Computer use basics

Keyboard and mouse, careful typing, files and folders, the web and email, installing software. Chapters 1–3 build on these, and the Java labs take them for granted.

Keyboard, mouse and shortcuts

Clicking · selecting · Ctrl shortcuts

You should be able to select, copy, move and undo quickly with the keyboard. The Windows and Office presentations introduce many more shortcuts on top of these.

Chapters Chapter 1.2 · Computer Hardware Chapter 2.2 · The Windows Operating System Chapter 3.1 · Microsoft Word Chapter 3.2 · Microsoft Excel Chapter 3.3 · Microsoft PowerPoint

Accurate typing and special characters

Upper and lower case · punctuation · brackets · keyboard layouts

Java is unforgiving: a single wrong capital letter or a missing semicolon stops compilation. Code must be typed letter for letter, including symbols that can be awkward to type on your keyboard layout.

Chapters Chapter 2.2 · The Windows Operating System Chapter 5 · Getting Started with Java Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals Chapter 11 · Strings

Files, folders, paths and extensions

Folder tree · absolute and relative paths · .java/.class

Programs are files that live in folders. You need to know where a file is saved, its full name including the extension, and how to read a path such as C:\Course\Week1\Hello.java.

Chapters Chapter 1.2 · Computer Hardware Chapter 2.1 · Software and Operating Systems Chapter 2.2 · The Windows Operating System Chapter 3.1 · Microsoft Word Chapter 5 · Getting Started with Java

Web browser, search and email

Web addresses · searching · attachments · safe habits

Throughout the course you download material, search for error messages, and submit assignments by email or through a learning platform. Chapter 1 also explains how web addresses (URLs), the Domain Name System (DNS) and email work behind the scenes.

Chapters Chapter 1.1 · Basic Concepts Chapter 1.4 · The Internet Chapter 1.5 · Computation and Computational Thinking Chapter 11 · Strings

Installing and updating software

Official sources · installers · versions

Before the programming chapters, a JDK (Java Development Kit) and an editor must be installed. To do this, the installer is downloaded from the official source, run, and the installed version is checked.

Chapters Chapter 2.1 · Software and Operating Systems Chapter 2.2 · The Windows Operating System Chapter 5 · Getting Started with Java

Arithmetic and numbers

Operator precedence, integers and decimal numbers, quotient and remainder, percentages and averages, powers and number bases, unit prefixes and logarithms.

Arithmetic and operator precedence

Parentheses · × ÷ first, then + − · left to right

Excel formulas and Java expressions follow the rules learned at school: parentheses first, then multiplication and division, and addition and subtraction last. Operations of the same precedence are performed from left to right.

Chapters Chapter 3.2 · Microsoft Excel Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals

Integers and decimal numbers

Integer · decimal number · rounding · decimal separator

A computer stores integers and decimal numbers differently. It matters which type of number a calculation is done with: the result of 5 / 2 is 2 in Java but 2.5 on a calculator.

Chapters Chapter 1.3 · Computers Chapter 3.2 · Microsoft Excel Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals

Division with quotient and remainder

/ and % on integers · odd/even · digits

Division with a remainder, learned in primary school (17 ÷ 5 = 3, remainder 2), is the most-used mathematics in the course: / gives the quotient and % gives the remainder.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.1 · Algorithms Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals Chapter 8 · Loops Chapter 9 · Methods Chapter 12 · Recursion

Percentages and averages

Percentage of a value · weighted grade · average

Grade sheets in Excel, methods that compute an average temperature, and array statistics rest on percentages, plain averages and weighted averages.

Chapters Chapter 3.2 · Microsoft Excel Chapter 6 · Variables, Data Types and Operators Chapter 9 · Methods Chapter 10 · Arrays

Powers and place value

Powers · position of digits · powers of 2

The value of a digit depends on the place it occupies (ones, tens, hundreds = 10⁰, 10¹, 10²). The same idea, with powers of 2, explains binary numbers. Computing powers is also a classic example for loops and recursion.

Chapters Chapter 1.1 · Basic Concepts Chapter 1.3 · Computers Chapter 3.2 · Microsoft Excel Chapter 8 · Loops Chapter 12 · Recursion

Number bases, bits and bytes

Binary numbers · KB and KiB · limited ranges

All data is stored as bits. You need to convert small numbers between decimal and binary, work out storage sizes in bytes, and see why a fixed number of bits limits the range of values.

Chapters Chapter 1.1 · Basic Concepts Chapter 1.2 · Computer Hardware Chapter 1.3 · Computers Chapter 6 · Variables, Data Types and Operators Chapter 8 · Loops

Units of measurement and prefixes

kilo, mega, giga · milli, micro, nano · Hz and seconds

In hardware, networking and operating systems, very large and very small numbers are written with prefixed units: 3 GHz is 3 billion cycles per second, and 5 ms is five thousandths of a second. You need to know which power of 10 each prefix stands for, and to be able to go from a frequency to a duration.

Chapters Chapter 1.2 · Computer Hardware Chapter 1.3 · Computers Chapter 1.4 · The Internet Chapter 2.1 · Software and Operating Systems

Logarithm (log₂)

Inverse of powers of 2 · number of halvings · number of bits

log₂ n tells you which power of 2 equals n: since 2¹⁰ = 1024, log₂ 1024 = 10. The same number also gives how many times n can be halved until it reaches 1. The number of bits needed to encode a set of values, and the number of rounds of a binary search, are found this way.

Chapters Chapter 1.1 · Basic Concepts Chapter 4.1 · Algorithms Chapter 4.1 · Algorithms Chapter 10 · Arrays Chapter 12 · Recursion

Algebra, logic and functions

Letters standing in for numbers, simple formulas, inequalities, and/or/not, and the function as a rule that turns input into output.

Variables and basic algebra

Letters for numbers · substitution · assignment

In algebra, a letter holds the place of a number. In programming, a variable is a named box whose contents can change. Substituting values for the letters in an expression is exactly what the computer does.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.3 · Introduction to Programming Chapter 4.2 · Flowcharts Chapter 6 · Variables, Data Types and Operators Chapter 8 · Loops

Everyday formulas

Area · temperature · quadratic equation

Many first programs turn a school formula into code: the area and circumference of a circle, converting Celsius to Fahrenheit, the roots of a quadratic equation, absolute value.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.3 · Introduction to Programming Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals Chapter 9 · Methods

Inequalities and ranges

< ≤ > ≥ · ranges · bounds

Conditions such as “10 < x < 20”, “grade ≥ 50” or “index from 0 to n − 1” are inequalities. Whether an endpoint is included is the source of many off-by-one errors.

Chapters Chapter 3.2 · Microsoft Excel Chapter 4.1 · Algorithms Chapter 4.2 · Flowcharts Chapter 7 · Conditionals Chapter 8 · Loops Chapter 10 · Arrays

Logic: and, or, not

True/false · truth tables · De Morgan

Every decision in a program is a statement that is true or false, and it is often combined with and, or, not. This logic appears in logic gates (Chapter 1), in Excel's AND/OR/NOT functions (Chapter 3) and in Java's &&, || and ! operators.

Chapters Chapter 1.1 · Basic Concepts Chapter 1.3 · Computers Chapter 3.2 · Microsoft Excel Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals Chapter 8 · Loops

Functions as input → output

f(x) · arguments · return value · composition

A function in mathematics takes inputs and gives a single output: f(x) = 2x + 3. Excel functions (=SUM(…)) and Java methods work the same way: arguments go in, a value comes back.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 3.2 · Microsoft Excel Chapter 4.3 · Introduction to Programming Chapter 9 · Methods Chapter 12 · Recursion

Sequences, divisibility and recursion

Sums such as 1 + 2 + … + n, prime numbers and the greatest common divisor, factorial and Fibonacci, counting layouts of rows and columns and positions. These are the standard examples of the presentations on loops, methods, arrays and recursion.

Number sequences and sums

1 + 2 + … + n · digit sum · running total

Adding up a sequence of numbers term by term is the first job of every loop (Chapter 4 flowchart “Example: Sum from 1 to n”, Chapter 8, Chapter 10, Chapter 12). Knowing the closed-form formulas lets you check the answer a program gives.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.2 · Flowcharts Chapter 8 · Loops Chapter 10 · Arrays Chapter 12 · Recursion

Divisibility, primes and GCD

Divisors · primality test · Euclid · LCM

Primality testing, perfect numbers, GCD/LCM and the sieve of Eratosthenes are standard examples in the presentations on algorithms, loops, methods, arrays and recursion.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.1 · Algorithms Chapter 8 · Loops Chapter 9 · Methods Chapter 10 · Arrays Chapter 12 · Recursion

Factorial, Fibonacci and recursive definitions

n! = n · (n − 1)! · base case · rapid growth

Some sequences are defined by referring to earlier terms: n! = n · (n − 1)! with 0! = 1, and each Fibonacci number is the sum of the two before it. The recursive methods in Chapter 12 are written in exactly this way.

Chapters Chapter 4.1 · Algorithms Chapter 8 · Loops Chapter 12 · Recursion

Counting, row-column layouts and positions

Rows × columns · patterns · counting from 0

Nested loops, star patterns, multiplication tables, two-dimensional arrays and string indices all rest on the same two skills: counting the cells in rows and columns, and numbering positions from 0.

Chapters Chapter 3.2 · Microsoft Excel Chapter 4.2 · Flowcharts Chapter 8 · Loops Chapter 10 · Arrays Chapter 11 · Strings

Reading and problem-solving skills

Following instructions literally, tracking values step by step, testing with carefully chosen inputs, and reading technical English.

Following step-by-step instructions

Recipes · algorithms · flowchart symbols

An algorithm is a recipe that must be carried out literally and in order, “without guessing what was meant”. Reading flowcharts and pseudocode is the bridge from everyday instructions to Java.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.3 · Introduction to Programming Chapter 4.1 · Algorithms Chapter 4.2 · Flowcharts

Tracing with a table of values

Trace tables · the state after each step

Every presentation has “Step by Step” slides that show the values of the variables after each step. You should be able to keep such a table on paper too: a column for each variable and a row for each step.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.1 · Algorithms Chapter 4.2 · Flowcharts Chapter 8 · Loops Chapter 9 · Methods Chapter 12 · Recursion

Breaking a problem into parts and testing

Decomposition · test cases · edge cases

Before writing code, the problem is split into inputs, steps and outputs. After the code is written, it is tested both with ordinary inputs and with the boundary values at which programs most often go wrong.

Chapters Chapter 1.5 · Computation and Computational Thinking Chapter 4.3 · Introduction to Programming Chapter 4.1 · Algorithms Chapter 4.2 · Flowcharts Chapter 8 · Loops Chapter 9 · Methods

Technical English and error messages

Java keywords · javac and runtime messages

Java's keywords, method names and all the messages from the compiler and the runtime environment are in English. Reading these messages carefully (what, where, which line) is the fastest way to fix a program.

Chapters Chapter 5 · Getting Started with Java Chapter 6 · Variables, Data Types and Operators Chapter 7 · Conditionals Chapter 8 · Loops Chapter 9 · Methods Chapter 10 · Arrays Chapter 11 · Strings Chapter 12 · Recursion

Tools and setup

A JDK and an editor or IDE, a few terminal commands, and an office suite.

A JDK and an editor or IDE

javac · java · .java → .class

From Chapter 5 on, Java programs are written, compiled and run on your own computer. For this, install a current JDK and either a plain editor or an IDE (for example Eclipse, IntelliJ IDEA or VS Code with a Java extension).

Chapters Chapter 4.3 · Introduction to Programming Chapter 5 · Getting Started with Java

Using the terminal (at the most basic level)

cd · dir/ls · running commands

A few commands are enough: seeing where you are, listing files, changing folders, and running javac/java. Chapter 2 introduces these commands for Windows (cmd) and for Linux/macOS.

Chapters Chapter 2.1 · Software and Operating Systems Chapter 2.2 · The Windows Operating System Chapter 5 · Getting Started with Java

Office software

Word · Excel · PowerPoint or a free alternative

Chapter 3 is taught with the English-language interface of Microsoft Word, Excel and PowerPoint. The university's Microsoft 365 account or a free alternative such as LibreOffice is enough to follow the course.

Chapters Chapter 1.1 · Basic Concepts Chapter 3.1 · Microsoft Word Chapter 3.2 · Microsoft Excel Chapter 3.3 · Microsoft PowerPoint

Presentation map

The topics each presentation rests on. Accurate typing matters in all the programming chapters.

PresentationTopicPrerequisites
Chapter 1.1Basic Concepts · study questionsWeb browser, search and email, Powers and place value, Number bases, bits and bytes, Logarithm (log₂), Logic: and, or, not, Office software
Chapter 1.4The Internet · study questionsWeb browser, search and email, Units of measurement and prefixes
Chapter 1.2Computer Hardware · study questionsKeyboard, mouse and shortcuts, Files, folders, paths and extensions, Number bases, bits and bytes, Units of measurement and prefixes
Chapter 1.3Computers · study questionsIntegers and decimal numbers, Powers and place value, Number bases, bits and bytes, Units of measurement and prefixes, Logic: and, or, not
Chapter 1.5Computation and Computational Thinking · study questionsWeb browser, search and email, Division with quotient and remainder, Variables and basic algebra, Everyday formulas, Functions as input → output, Number sequences and sums, Divisibility, primes and GCD, Following step-by-step instructions, Tracing with a table of values, Breaking a problem into parts and testing
Chapter 2.1Software and Operating Systems · study questionsFiles, folders, paths and extensions, Installing and updating software, Units of measurement and prefixes, Using the terminal (at the most basic level)
Chapter 2.2The Windows Operating System · study questionsKeyboard, mouse and shortcuts, Accurate typing and special characters, Files, folders, paths and extensions, Installing and updating software, Using the terminal (at the most basic level)
Chapter 3.1Microsoft Word · study questionsKeyboard, mouse and shortcuts, Files, folders, paths and extensions, Office software
Chapter 3.2Microsoft Excel · study questionsKeyboard, mouse and shortcuts, Arithmetic and operator precedence, Integers and decimal numbers, Percentages and averages, Powers and place value, Inequalities and ranges, Logic: and, or, not, Functions as input → output, Counting, row-column layouts and positions, Office software
Chapter 3.3Microsoft PowerPoint · study questionsKeyboard, mouse and shortcuts, Office software
Chapter 4.3Introduction to Programming · study questionsVariables and basic algebra, Everyday formulas, Functions as input → output, Following step-by-step instructions, Breaking a problem into parts and testing, A JDK and an editor or IDE
Chapter 4.1Algorithms · study questionsDivision with quotient and remainder, Logarithm (log₂), Inequalities and ranges, Divisibility, primes and GCD, Factorial, Fibonacci and recursive definitions, Following step-by-step instructions, Tracing with a table of values, Breaking a problem into parts and testing
Chapter 4.2Flowcharts · study questionsVariables and basic algebra, Inequalities and ranges, Number sequences and sums, Counting, row-column layouts and positions, Following step-by-step instructions, Tracing with a table of values, Breaking a problem into parts and testing
Chapter 5Getting Started with Java · study questionsAccurate typing and special characters, Files, folders, paths and extensions, Installing and updating software, Technical English and error messages, A JDK and an editor or IDE, Using the terminal (at the most basic level)
Chapter 6Variables, Data Types and Operators · study questionsAccurate typing and special characters, Arithmetic and operator precedence, Integers and decimal numbers, Division with quotient and remainder, Percentages and averages, Number bases, bits and bytes, Variables and basic algebra, Everyday formulas, Logic: and, or, not, Technical English and error messages
Chapter 7Conditionals · study questionsAccurate typing and special characters, Arithmetic and operator precedence, Integers and decimal numbers, Division with quotient and remainder, Everyday formulas, Inequalities and ranges, Logic: and, or, not, Technical English and error messages
Chapter 8Loops · study questionsDivision with quotient and remainder, Powers and place value, Number bases, bits and bytes, Variables and basic algebra, Inequalities and ranges, Logic: and, or, not, Number sequences and sums, Divisibility, primes and GCD, Factorial, Fibonacci and recursive definitions, Counting, row-column layouts and positions, Tracing with a table of values, Breaking a problem into parts and testing, Technical English and error messages
Chapter 9Methods · study questionsDivision with quotient and remainder, Percentages and averages, Everyday formulas, Functions as input → output, Divisibility, primes and GCD, Tracing with a table of values, Breaking a problem into parts and testing, Technical English and error messages
Chapter 10Arrays · study questionsPercentages and averages, Logarithm (log₂), Inequalities and ranges, Number sequences and sums, Divisibility, primes and GCD, Counting, row-column layouts and positions, Technical English and error messages
Chapter 11Strings · study questionsAccurate typing and special characters, Web browser, search and email, Counting, row-column layouts and positions, Technical English and error messages
Chapter 12Recursion · study questionsDivision with quotient and remainder, Powers and place value, Logarithm (log₂), Functions as input → output, Number sequences and sums, Divisibility, primes and GCD, Factorial, Fibonacci and recursive definitions, Tracing with a table of values, Technical English and error messages

© Sercan Külcü · Computer Fundamentals and Introduction to Programming