& Random Fibonacci Sequence! &
use random; & Imports random package &
defFunc fib ( amount ) { & Defines Fibonacci function &
fib1 = 0;
fib2 = 1;
loop i from 1 to amount { & For Loops &
fibsaver = fib1;
fib1 = fib2;
fib2 = fib2 + fibsaver; & Finds Fibonacci &
}
give fib2; & Returns answer &
}
completeWhile True { & While Loops &
looping_time = captureInt "How many times to find fibonacci number?";
completeIf looping_time <= 2 { & If statement &
stampLn "Must Choose 3 or more!";
}
completeElseIf looping_time >= 1000 { & Else If statement &
stampLn "The number cannot be above 1000. Try again.";
}
completeElse { & Else Statement &
quitLoop; & Stops loop &
}
}
num = 1;
completeWhile num <= looping_time {
amount_to_do = randomint(5,20); & Chooses random number &
finished_fib = fib(amount_to_do);
stampLn "{finished_fib} is number {amount_to_do} in the fibonacci sequence."; & Allows F-Strings in Like in Python without the F at the beginning &
num += 1;
}
The full documentation can be found in the README.md.
Lenstadt Language
Lenstadt
Lenstadt is a computer language meant to torture you with its inflexible ways.
It was created by me and @jhugh36
Documentation
Lenstadt has the following functionalities:
So here's an example fibonacci number sequence:
The full documentation can be found in the README.md.
Github: https://github.com/aguy11/Lenstadt
Interesting...