← Back to challenges

Guess the Sequence

PythonHardalgorithmslogicmathnumbers

Instructions

Mubashir is trying to figure out the corresponding quadratic formula for the following quadratic sequence of numbers:

NResult
190
2240
3450
4720
51050

If you can figure this out, then help him by creating a function that takes a number n and returns the nth number of this quadratic sequence.

Examples

guess_sequence(1) ➞ 90

guess_sequence(2) ➞ 240

guess_sequence(3) ➞ 450
python3
Loading editor…
to run
Walks through the solution with reasoning and edge cases.
Next: Split Item Codes