78185 - Computer Laboratory for Mechanical Engineering

Academic Year 2019/2020

  • Docente: Niccolò Moggi
  • Credits: 3
  • SSD: ING-IND/18
  • Language: Italian
  • Teaching Mode: Traditional lectures
  • Campus: Bologna
  • Corso: First cycle degree programme (L) in Mechanical Engineering (cod. 0927)

Learning outcomes

On completion of this course the students will be able to develop Python scripts and will be familiar with numeric and graphic libraries

Course contents

Introduction to the Python language:

variables and expressions

types and objects

flow control structures

built-in data structures

the standard library and modules

functions

Practical applications on random number generators, statistics and data analysis, plots and histograms, numerical differentiation and integration, algorithmical errors.

Some fundamental Python libraries as NumPy, SciPy, Matplotlib will be introduced and used.

Readings/Bibliography

No study book is necessary, but a Python manual may be usefull together with a computationa physics text.

Possible suggestions:

- Hans Petter Langtangen, "A Primer on Scientific Programming with Python"

- "How to Think Like a Computer Scientist" (http://openbookproject.net/thinkcs/python/english3e/)

Teaching methods

Lectures will be held in laboratory where a computer will be available for each student. Large parte of the time will be devoted to exercises and practicing.

Assessment methods

Some of the practical exercises done during lectures will be graded.

A final practice test is due at the end of the course.

Those students that already have some knowledge of Python may replace the exercises during the course with the development of a new project that they should preliminarly agree upon with the lecturer.

Teaching tools

Videoprojector, computer, overhead projector

Office hours

See the website of Niccolò Moggi