keep coding on this level
The Fibonacci sequence is a sequence of numbers starting from 1, where each number is the sum of the two previous numbers. You can compute sums with the +
operator.
1, 1, 2, 3, 5, 8, 13, 21, ...
The alien on the left used the fifth number from this sequence (5
) as its password, and the one on the right used the tenth Fibonacci number.
Use variables to calculate the password of each spaceship, then crash them into the mothership.
transmission
// The fifth Fibonacci number
f1 = 1
f2 = 1
f3 = f1 + f2 // 2
f4 = f3 + f2 // 3
f5 = f4 + f3 // 5
login(f5)
xxxxxxxxxx
// The tenth Fibonacci number
login( )