Teaching Workshop: Introduction to Python Programming

A.Y. 2024/2025
3
Max ECTS
20
Overall hours
Language
Italian
Learning objectives
This introductory workshop aims to provide participants with a foundational understanding of Python programming. Participants will learn the basics of Python syntax, data types, control structures, and functions through hands-on exercises and interactive demonstrations. By the end of the workshop, attendees will have the essential knowledge and skills to start writing simple Python programs and exploring the vast possibilities offered by this versatile programming language.
1. Basic Understanding: Introduce participants to the fundamental concepts of Python programming, including syntax and data structures.
2. Hands-on Learning: Provide practical experience through guided exercises and examples, enabling participants to apply their knowledge in real-time.
3. Problem-solving Skills: Foster problem-solving abilities by tackling coding challenges and exercises designed to reinforce learning objectives.
4. Confidence Building: Build confidence in participants by demystifying programming concepts and providing a supportive learning environment.
Expected learning outcomes
1. Foundational Knowledge: Participants will gain a solid understanding of Python syntax, data types, and control structures.
2. Ability to Write Basic Programs: By the end of the workshop, attendees will be able to write simple Python programs to solve basic computational tasks.
3. Problem-solving Proficiency: Participants will develop problem-solving skills and the ability to translate problem statements into Python code.
4. Engagement and Interest: The workshop will spark participants' interest in further exploring Python programming and its applications in various domains.
5. Preparation for Further Learning: Attendees will be equipped with the necessary foundation to pursue more advanced topics in Python programming independently or in further workshops.
Single course

This course cannot be attended as a single course. Please check our list of single courses to find the ones available for enrolment.

Course syllabus and organization

Single session

Responsible
Lesson period
First semester
Course syllabus
The lectures will be focused on the following topics:
1. Outline of the Python language. Comparison to several other compiled or interpreted programming languages. Showcase of the Python abilities.
2. Usage of Python in the cloud. Get a local Python environment up and running. Execution of Python commands. Running Python programs. Installing code libraries.
3. Functions: basics of functions, defining functions, applications of functions, recursive function calls.
4. Python essentials: data types, input and output, iterating, comparisons and logical operators, coding style, and documentation.
5. Object-oriented programming: classes, objects, methods, names and name resolution.
6. Using GitHub for code versioning: the concepts of repository, commit, push, branch, merge, pull request, and main GitHub commands.
7. The NumPy library: arrays, arithmetic operations, matrix multiplications, broadcasting, mutability, and copying arrays.
8. The Matplotlib library: the MATLAB-style API, the object-oriented API, 2D and 3D plots, subplots, and style sheets.
9. Text data processing and basic natural language processing (for example, writing Python code for frequency counting in texts and TF-IDF feature extraction).
10. The Pandas library: Pandas series, Pandas DataFrames, and online data sources. For example, writing Python code for importing, manipulating, analyzing, and visualizing bibliographic databases (Scopus and Web of Science).
Prerequisites for admission
No prior knowledge is required; however, students who have knowledge of at least one other interpreted programming language, such as R, MATLAB, JavaScript, or PHP, are at an advantage.
Teaching methods
Lectures are planned on Microsoft Teams with the use of Jupyter notebooks and teaching materials that will be progressively made available on the dedicated laboratory Team.
Teaching Resources
Jupyter notebooks and teaching materials provided by the Professor will be progressively made available on Microsoft Teams. In particular, the teaching materials will refer to the following bibliography:
- Allen B. Downey, Think Python. O'Reilly, Third Edition, 2024 [English Language].
- T. Gaddis, Introduzione a Python, Pearson, Fifth Edition, 2022 [Italian Language].
- The Python Tutorial, available online at: https://docs.python.org/3/tutorial/index.html [English Language].
- S. Bolasco, L'analisi automatica dei testi, Carocci Editore, 2021 [Italian Language].
- M. Weisser, Python Programming for Linguistics and Digital Humanities: Applications for Text-Focused Fields. Wiley-Blackwell, 2024 [English Language].
- F. Karsdorp, M. Kestemont, & A. Riddell, Humanities Data Analysis: Case Studies with Python. Princeton University Press, 2021 [English Language].
Assessment methods and Criteria
A final project submission is required, the content of which must be agreed upon in advance with the Professor. The project consists of Python code focused on the analysis, manipulation, and visualization of textual or bibliographic data. The Python code must be accompanied by a brief report in PDF format describing the work done. Alternatively, a single Jupyter notebook containing both Python code and explanatory text may be submitted. The final project aims to verify that the student has understood the tools introduced during the laboratory lessons and is able to use them correctly, consciously, and critically. The final result of the Laboratory is given as Approved or Not Approved.
- University credits: 3
Humanities workshops: 20 hours
Professor: Bodini Matteo
Professor(s)
Reception:
To be agreed by scheduling an appointment
Room 37 (3rd floor) or Microsoft Teams