index | submit | rank | book

Computer Science by Example

Welcome to Computer Science by Example! Here you can learn computer programming through a series of exercises. Each exercise is built on top of the previous applying a new concept.

To work on the exercises, you will need:

If you need help, read the Computer Science by Example book online.

If you are a lecturer/professor/instructor/teacher, you can use the collection of exercises provided here as part of your teaching material in a programming module/course. See the relevant question in the FAQ for details of how.

Exercise Index

The exercise index is divided into volumes and chapters matching the Computer Science by Example book. After solving each of the exercises, you are invited to submit your solution to an automated online judge which will give you a score and track your progress through your very own user page. Try to get a 1/1 score before moving to the next exercise.

The online judge supports solutions in: Python, C, Haskell, C++, C#, Java, JavaScript, Lua, Ruby, Racket or Scheme.

Volume 1: Programming and Algorithms

This first volume of exercises introduces programming and algorithms.

3. Programming Basics

Exercises in this chapter introduce basic programming concepts, such as: printing and reading from standard I/O, functions, number operations, conditionals and repetition. Beginner programmers can use this chapter to learn their first programming language. Experienced programmers can use this chapter to learn a new programming language.

4. Programming

Exercises in this chapter involve fundamental programming concepts. Some exercises are more challenging versions of exercises from previous chapter. Beginner programmers can use this chapter to improve their programming skills. Experienced programmers can use this chapter while learning a new programming language.

5. Mathematical Foundations

Exercises in this chapter involve the mathematical foundations of Computer Science: positional numeral systems, logic and boolean algebra, sets and relations. These exercises can be used both as an introduction to these topics or as additional exercises by students working through an academic module.

6. Algorithms

Exercises in this chapter involve the implementation of some common and basic algorithms.

7. Computer Foundations

Exercises in this chapter involve practical computer foundations used in system’s programming.

8. Advanced Programming

To be added.

9. Computational Complexity

To be added.

Bonus exercises

About

CScx, Copyright © 2020-2023 Rudy Matela, All rights reserved.

Email: rudy [at] cscx [dot] org

I am interested in publishing a print book and ebook following the exercises presented here. The first 4 chapters are currently freely available online. If you are an editor and like the idea, contact me at rudy [at] cscx [dot] org.

If you find errors on the website like broken links, typos or incorrect/ambiguous exercise descriptions, feel free to mail me at rudy [at] cscx [dot] org.

The exercises here assume secondary education knowledge (High School / ages 17 and up). However, younger students who have not completed secondary education but are interested in programming may also benefit from these exercises (ages 13 and up).

If you are a lecturer/professor/instructor/teacher, you can use the collection of exercises provided here as part of your teaching material in a programming module/course. See the relevant question in the FAQ for details of how.

CScx is not the first of its kind: there are other websites with online programming exercises dating back to at least 1995. However, most online judges are focused on competitive programming problems. Here on CScx the focus is rather on introducing programming step by step with exercises of incremental difficulty.

More exercises will be added in the future, for example, on the topics of data structures and graphs. I may potentially release the exercise test sets for educational use in the future. This way, teachers, lecturers and professors teaching programming and CS modules will be able to run their own exercise sets.

CScx is powered by Udge Online Judge.

index | submit | rank | book

Copyright © 2020-2023 Rudy Matela
All rights reserved