Information for the 2nd Practical Test
General Information
- Date: 17/12/2025 (wednesday)
- Time: There will be two shifts for the test (14:30 and 16:30)
[see student allocation to shift and room] (protected access)
- Place: DCC Labs (FC 6)
- Duration: 2h
- Method: the test will be individual and will consist of practical problems for which you can submit Python code to Mooshak and receive feedback that might include public test cases, like in the practical classes
- Language: all problem statements will be available in english and in portuguese
- Environment: the computers will have Linux, with python available at command line, and the usual editors and IDEs; you will have access to documentation (local copy of python docs) and to a local copy of the jupyter notebooks of the lectures (an html static version).
- Scoring: this test is worth 4 points out of 20 (20% of your class grade) [see explanation and calculation formula of final grade]
You will have 6 small exercises in Mooshak worth 20%+20%+20%+20%+10%+10%.
In each exercise there might be partial scoring (e.g. passes some tests, fails on others).
When submitting, you will know the score you got on all tests. Your grade on a problem will be the grade of your best submission on that problem (the one with the highest score), and you can submit as many times as you want (subject to 60 seconds wait between submissions).
Specific goals for each exercise and training problems
- [20%] Exercise 1: dictionaries and sets
Something at the level of the dictionary main exercises of practical class #07 (dictionaries and sets), where you will implement a function and will need to used dictionaries and/or sets.
- [20%] Exercise 2: exceptions
Something at the level of the main exercises of practical class #11 (exceptions), where you will implement a function and will need to handle exceptions.
- [20%] Exercise 3: advanced strings
Something at the level of the main exercises of practical class #08 (advanced strings), writing a function that receives input from the arguments and will need to handle strings.
- [20%] Exercise 4: efficiency
Something at the level of the set main exercises of practical class #06 (correction and efficiency), where you will implement a function. To obtain full score your code will need to be efficient and you should be aware of the algorithmic techniques discussed in practical class #06 (namely sliding windows and prefix sums).
- [10%] Exercise 5: recursion
Something at the level of the main exercises of practical class #09 (recursion), writing a function that receives input from the arguments. The problem will be suited to a recursive solution (but if you can make it withouth recursion, we will also accept it). You will not be able to use the module itertools.
- [10%] Exercise 6: Structured Programming
Something at the level of the the main or extra exercises of practical class #10 (structured programming and incremental development), writing a program that reads from the standard input and writes to the standard output. The problem will have several subtasks and will be suited a decomposition of the code into smaller functions.