76528 - Laboratory of Computer Programming

Academic Year 2019/2020

  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: First cycle degree programme (L) in Economics and Finance (cod. 8835)

Learning outcomes

At the end of the course students know the basic principles of computer programming and are able to further investigate issues they may encounter in their future studies and career that can be addressed with computer programming. They learn “hands on” about key elements of programming: variables, expressions and commands; functions, conditionals and recursion; iterations; types of data; problem solving, editing, compiling and debugging.

Course contents

The "Laboratory of Computer Programming" course aims providing a basic knowledge of Programming. No computer pre-requisites are required. A detailed description of the R language is provided. Then, fundamental problems and some of the most important and interesting solving algorithms are analyzed.

1. Introduction

Programming languages: a bit of history. The R programming language. What is a program? What is needed to program in R?

2. Variables, expressions and statements

Values and types. Variables. Names and keywords. Operators and operands. Expressions and statements. Order of operations. String and string operations.

3. Flow control

Analysis of the most used instructions and functions for flow control. In particular, if, else, for, while, break and continue instructions.

4. Functions

Function calls. Parameters and arguments. Type conversion functions. Math functions. How to create a new function.

5. Programs

How to create a R program. Starting from simple examples to learn the "good programming" rules, we will come up with advanced programs to solve complex problems.


E-Book: "R Programming", tutorialspoint. Website: https://www.tutorialspoint.com/r/index.htm

E-Book: "Get started in R: a complete beginners workbook", R Statistics.Net. Website: http://rstatistics.net/r-tutorial-exercise-for-beginners/

Teaching methods

Classroom lessons and practice using the student's notebook. It is therefore important that the students remember to bring their personal notebooks during the lessons. In the absence of a personal notebook, the student can work with a partner. Each topic will be treated jointly with significant case studies to highlight its meaningful applications. The student will practice solving computer problems and creating small software tools using the language R.

Assessment methods

The exam consists of a written part and an optional oral part based on the outcome of the written part. For this course there is no final numeric score, but simply a final evaluation in the form "pass/fail".

Teaching tools

In the "Teaching" section of the Filippo Piccinini's personal website all the slides shown during the lessons are available for download as well as the software tools for practice with the personal computer.

Links to further information


Office hours

See the website of Filippo Piccinini