====== Description of Course Unit ====== **Master in Informatics and Computing Engineering\\ Programming Fundamentals\\ Instance: 2018/2019** \\ --- \\ //**[[https://sigarra.up.pt/feup/en/UCURR_GERAL.FICHA_UC_VIEW?pv_ocorrencia_id=419983|Institutional page]]**// ===== General information ===== **Course Unit**: Programming Fundamentals\\ **Acronym**: FPRO\\ **Course**: MIEIC\\ **Curricular Years**: 1º\\ **Official website**: [[https://sigarra.up.pt/feup/en/UCURR_GERAL.FICHA_UC_VIEW?pv_ocorrencia_id=419983|Sigarra]]\\ **Credits ECTS**: 6\\ **Contact hours**: 70\\ **Total Time**: 162\\ **Instance**: 2018/2019\\ **Semestre**: 1S\\ **Lectures**: 2x1,5h: João Correia Lopes ([[http://www.fe.up.pt/uk/funcionarios_geral.FormView?p_codigo=230756|JCL]]) \\ **Recitations**: 7x2h: João Correia Lopes ([[http://www.fe.up.pt/uk/funcionarios_geral.FormView?p_codigo=230756|JCL]]) & Rui Camacho ([[https://sigarra.up.pt/feup/en/func_geral.formview?p_codigo=209847|RCS]])\\ **Attendance**: 1x1h: [[https://sigarra.up.pt/feup/pt/fest_geral.cursos_list?pv_num_unico=201504088|João Damas]] ===== Teaching language ===== Portuguese. ===== Objectives ===== 1. BACKGROUND Fluency in the process of software development is a basic prerequisite to the work of Informatics Engineers. In order to use computers to solve problems effectively, students must be competent at reading and writing programs using higher-order programming languages. 2. SPECIFIC AIMS The global aim of this Unit is to give the student the ability to create algorithms, and to use a programming language to implement, test, and debug algorithms for solving simple problems. The student will be able to understand and use the fundamental programming constructs, and the Functional approach to programming, specifically effect-free programming where function calls have no side-effects and variables are immutable, and contrast it with the Imperative approach. 3. PERCENTUAL DISTRIBUTION Scientific component: 40%\\ Technological component: 60% ===== Learning outcomes and competences ===== At the end of the course, the student is expected to handle programming problems of medium complexity, using the imperative or functional programming approaches or paradigms. More specifically, the student will be able to: - Design, implement, test and debug a program that uses the fundamental programming constructs, basic computations, standard conditional and iterative structures, simple Input/Output, persistence and exceptions. - Understand Data Abstraction and use simple and aggregate data types. - Understand Procedural Abstraction and use the definition of functions, parameter passing, recursion - Write useful functions that take and return other functions. - Implement basic algorithms that avoid assigning to mutable state or considering reference equality. - Correctly reason about variables and lexical scope in a program using function closures. - Define and use iterators and other operations on aggregates, including operations that take functions as arguments (especially map, reduce/fold, and filter). - Use the programming tools that help writing, testing and documenting computer programs according to the programming best practices. ===== Working method ===== Presential. ===== Pre-requirements (prior knowledge) and co-requirements (common knowledge) ===== No previous knowledge is required. ===== Programme ===== * Introduction to problem solving, algorithms and programming with Python. * Fundamental programming concepts: simple data types; variables, expressions and statements; program flow, conditionals, iteration; persistence. * Working with aggregate data types: strings, tuples, lists, dictionaries. * Functions, parameter passing, recursion. * First-class functions and closures. * Utility higher-order functions: map, reduce/fold, and filter. * Effect-free programming by using function calls without side effects and immutable variables. * Programming tools, debugging, exceptions and problem-solving strategies. ===== Mandatory literature ===== * Peter Wentworth, Jeffrey Elkner, Allen B. Downey, and Chris Meyers, //How to Think Like a Computer Scientist — Learning with Python 3//, 2012 [[https://media.readthedocs.org/pdf/howtothink/latest/howtothink.pdf|[PDF 2018] ]][[http://openbookproject.net/thinkcs/python/english3e/|[HTML] ]] [[http://catalogo.up.pt/F/?func=direct&doc_number=000469776&local_base=UPB01|[Library] ]] ===== Complementary bibliography ===== * Brad Miller and David Ranum, Learning with Python: Interactive Edition. Based on material by Jeffrey Elkner, Allen B. Downey, and Chris Meyers [[http://interactivepython.org/runestone/static/CS152f17/index.html|HTML]] * Steven F. Lott, Building Skills in Python - A Programmer's Introduction to Python, FreeTechBooks, 2010 [[http://www.freetechbooks.com/building-skills-in-python-a-programmer-s-introduction-to-python-t687.html|HTML]] * Allen Downey, Think Python — How to Think Like a Computer Scientist, 2nd Edition, Version 2.2.23, Green Tea Press, 2015 [[http://greenteapress.com/thinkpython2/html/index.html|HTML]] [[http://greenteapress.com/thinkpython2/thinkpython2.pdf|PDF]] [[https://github.com/AllenDowney/ThinkPython2|code]] * David Mertz, Functional Programming in Python, O’Reilly Media, 2015 [[http://www.devlang.com/static/s17/cse294/functional-prog-in-python.pdf|PDF]] * Guttag, John. Introduction to Computation and Programming Using Python: With Application to Understanding Data, Second Edition. MIT Press, 2016. ISBN: 9780262529624. * João Pavão Martins, Programação em Python - Introdução à Programação Utilizando Múltiplos Paradigmas, Instituto Superior Técnico, 2ª edição, 2017, ISBN: 9789898481474 ===== Teaching methods and learning activities ===== The continuous enrollment of the student in the course is promoted, both with the study and discussion of the course topics in lectures and recitation classes and with in-class and away programming assignments. Automatic correction tools are used to increase the efficiency of feedback given to the students. The student is motivated to find the best ideas to solve specific problems, execute them and implement the programming solutions, in an elegant, legible and efficient (time and space) mode. The Python programming language is used for these developments. Lecture classes are used to present and discuss the topics of the program, using a computer connected to a multimedia projector. Recitation classes are used to help students understand the topics of the program and solve the weekly programming assignments. In-class and away programming assignments are given, in a weekly basis, to improve the regular and effective development of autonomous learning processes. In-class assignments are used for summative evaluation in the end of each class (//Moodle quizzes//). Furthermore, a game-based learning and trivia platform (//Kahoot//) is used to have formative evaluation in order to assess how effective Lecture classes are and help tuning the pace and emphasis on the class topics. ===== Software ===== * Python 3.6 (https://www.python.org/) * Spyder3 (https://docs.spyder-ide.org/) ===== Keywords ===== Physical sciences > Computer science > Programming ===== Type of assessment ===== Distributed evaluation without final exam. ===== Evaluation and occupation components ===== ^ Description ^ Type ^ Time (Hours) ^ Date of conclusion ^ | Attendance (estimated) | Lectures | 70 | | | PE1 | Test/Examination | 0 | 26/10/2018 | | PE2 | Test/Examination | 0 | 23/11/2018 | | PE3 | Test/Examination | 0 | 21/12/2018 | | PE | Test/Examination | 0 | 08/01/2019 | | TE | Test/Examination | 0 | 11/01/2019 | | Study | Study | 92 | | | | Total: | 162 | | ===== Eligibility for exams ===== Students are eligible to the final theory exam, if they do not exceed the absences limit (25% of total number of estimated recitation classes) and if they obtain a minimum of 40% in the evaluation component associated with practical on computer evaluation (PE). ===== Calculation formula of final grade ===== The evaluation will be based on the following components: **LE** = Lecture in-class assignments\\ **RE** = Recitation and away programming assignments\\ **PEn** = Practical on computer evaluation (nth)\\ **PE** = (PE1 + PE2 + PE3) / 3\\ **TE** = Theory evaluation with one open-book consultation **Final classification** = 10% LE + 10% RE + 40% PE + 40% TE **Observations**: - A minimum classification of 40% in the component TE is required. - There will be another TE for students, eligible to the exam, that miss the examination with proper justification, or students that did not obtain the minimum required in the component. In the later case, the grade is limited to 50%. - If the final classification is greater than 17, the student may be submitted to an oral examination and the final grade is the average of both grades. - Students which achieve at least 85% in the in-class and weekly programming assignments (LE+RE), by the middle of the course, may opt to retain the grade and do a small project to achieve the maximum grade (100%). ===== Examinations ===== The evaluation of this course uses three types of examinations: - In-class and away programming assignments related with the current topics, to be submitted in Moodle and automatically graded. - Practical on computer evaluation, with consultation of given languages reference texts, of a set of small computer programs using Moodle and automatically graded. - Theory evaluation with one book consultation using a multiple-choice questionnaire in Moodle to assess students ability to use and discuss the best algorithms and data structures for specific problems. ===== Special evaluation (TE, DA, ...) ===== The final classification will be the average of the classification of two evaluation components: Practical on computer evaluation (PE) and Theory evaluation (TE). **Final classification** = 50% PE + 50% TE **Observations**: - A minimum classification of 40% of each component, PE and TE, is required. - If, by a teaching staff decision, one of the evaluation components is not performed, it is replaced by an oral examination. - If the final classification is greater than 17, the student may be submitted to an oral examination and the final grade is the average of both grades. ===== Classification improvement ===== The student may ask for a single examination, with consultation of one book only, graded in a 0 to 20 scale. If the final classification is greater than 17, the student may be submitted to an oral examination and the final grade is the average of both grades. ===== Observations ===== No individual component grades (LE, RE, PE, TE) can be reused in another enrolment in the course. ((**LE** = RTFM / Book (and understand) + See good coding examples)) ((**REPETE** = Experiment with the given programs and exercises)) \\ --- //FPRO, 2018/19//