76528 - Laboratory of Computer Programming

Academic Year 2018/2019

  • 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 prerequisites 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.

Readings/Bibliography

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. Each topic will be treated jointly with significant case studies to highlight its meaningful applications.

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". The positive result obtained by the students resulting eligible, is recorded in the days following the communication of the exam's result (if is not request to attend to the oral part). Students who in case of a positive result do not want to verbalize their eligibility, must send the request by email to the professor immediately after the written part of the exam.

Teaching tools

In the teaching material section and the Filippo Piccinini's personal website all the slides shown in class are available for download as well as the material for practice with the personal computer.

Office hours

See the website of Filippo Piccinini