Top answers


Implement a fibonacci function which calculates the nth number of the fibonacci sequence.

def fib(n): if n <= 1: return n else: return(fib(n-1) + fib(n-2)) This is the code for a very basic version. This coud be used to explain how recursion works thanks to a relatively easy example.
AF
Answered by Atom F. Python tutor
1748 Views

A business is planning to invest in a new machine which will cost £220 000. The machine will lead to an annual increase in revenue of £75 000. It will also lead to extra labour costs of £28 000 per annum but will reduce the firm’s energy costs by £4 000

Annual return is £75 000 – £28 000 + £4 000 = £51 000 Return on investment = annual return x 100 = £51 000 x 100 = initial cost £220 000 Answer = 23.2% or 23%
DS
3562 Views

(a) Express x +4x+7 in the form (x+ p) +q , where p and q are integers.

(x + 2) 2 +3
DS
Answered by Dylan S. Maths tutor
4802 Views

For sketching the graph of the modulus of f(x) (in graph transformations), why do we reflect in the x-axis anything that is below it?

Let's remember what applying a modulus to any number actually does. Applying the modulus to a number just gives us back the positive version of that number- if it is positive, we get back itself, and if it i...
SR
Answered by Stefanos R. Maths tutor
6199 Views

Why is DNA replication called semi-conservative replication?

Semi-conservative replication refers to replication of DNA in which the newly produced DNA molecules will contain 1 strand from the original DNA and a another strand that had been newly synthesised. In order...
AA
Answered by Awais A. Biology tutor
17431 Views