In this problem you must implement several functions in Python.
Write a function @absValue(x)@ that, given a number, returns its absolute value.
Write a function @power(x, p)@ that, given a number and a natural , returns raised to , that is, .
Write a function @isPrime(x)@ that, given a natural, returns a Boolean that tells whether it is a prime number or not.
Write a function @slowFib(n)@ that, returns the -th element of the Fibonacci sequence using the recursive algorithm according to its definition (, , for ).
Write a function @quickFib(n)@ that, returns the -th element of the Fibonacci sequence using a faster algorithm.
Each function scores 20 points.
Author: Unknown
Translator: Jordi Petit
Generation: 2026-01-25T12:03:11.125Z
© Jutge.org, 2006–2026.
https://jutge.org