OnlineTA for Programmering og Problemløsning 2023

This is the OnlineTA instance for the PoP course; use it to double-check your assignments before submitting them to Absalon. The tests are not a complete substitute for your own assessment. You may want to write your own tests as well. OnlineTA is solely an indication of how complete your solution is, and to catch any remaining problems that you may have overlooked.

Note that an OnlineTA run may take up to a couple of minutes to complete, especially when the server load is high. Please help keep this resource available for everyone by not submitting a new job until your previous one has finished.

First assignment: Fibonacci numbers

Task:Make a Python module fib with a function fib, that takes an integer argument n, and returns the n'th Fibonacci number.

To check your code: prepare a handin.zip archive containing the files test.py and first.py ; then do one of these things:

  1. Use the web interface:
  2. Run curl -F handin=@path/to/handin.zip https://pop.incorrectness.dk/grade/python-first in a terminal
    — assumes you have the curl command-line program and that you have created the handin file handin.zip.

Second assignment: Find element

Task:Make a Python module second with a function python-find, that takes to arguments: an array, arr and an element, x, to search for in arr, and returns the index of x in arr, or a negative number if x isn't in arr.

Real task: The test suite for this task is not very good. Your real task is to construct a python-find function that satisfy the above specification but reveals the shortcomings in the test suite.

To check your code: prepare second.py; then do one of these things:

  1. Use the web interface:
  2. Run curl -F handin=@path/to/second.py https://pop.incorrectness.dk/grade/python-find in a terminal
    — assumes you have the curl command-line program and that you have created the handin file second.py.