Fibonacci

These are some small scripts related to the Fibonacci sequence I wrote for an Italian

Fibonacci Sequence Maker

This creates a Fibonacci sequence from 2 input numbers.

Example output

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
Enter the first fib : 4
Enter the second fib: 6
How many in the sequence would you like: 14
     The sequence created by 4 and 6 is:
---------------------------------------+---
                                      4:  1
                                      6:  2
                                     10:  3
                                     16:  4
                                     26:  5
                                     42:  6
                                     68:  7
                                    110:  8
                                    178:  9
                                    288: 10
                                    466: 11
                                    754: 12
                                   1220: 13
                                   1974: 14

Fuzzy Sequence Maker

This program takes 3 numbers as in input, calculates the percent deviation required for the third number to follow the first two in the sequence, and builds a sequence with the range produced by that deviation. You’ll just have to try it out for it to make sense.

Example output

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
  _____                                 _____   _   _
 |  ___|  _   _   ____  ____  _   _    |  ___| (_) | |__
 | |_    | | | | |_  / |_  / | | | |   | |_    | | | '\
 |  _|   | |_| |  / /   / /  | |_| |   |  _|   | | | |_) |
 |_|      \__,_| /___| /___|  \__, |   |_|     |_| |_.__/
                              |___/
             ____     ___     ___     ___
            | ___|   / _   / _   / _ \
            |___  | | | | | | | | | | | |
             ___) | | |_| | | |_| | | |_| |
            |____/   \___/   \___/   \___/

        ******** Now with 3% more Fib! ********

Enter the first  fib: 5
Enter the second fib: 8
Enter the third  fib: 12
Enter the quantity  : 14
The variance is 7.69%
Continuing the sequence, we get...
--|--------------------------------------|--------------------------------------
 3:                                12.00 - 14.00
 4:                                16.62 - 19.38
 5:                                28.62 - 33.38
 6:                                45.23 - 52.77
 7:                                73.85 - 86.15
 8:                               119.08 - 138.92
 9:                               192.92 - 225.08
10:                               312.00 - 364.00
11:                               504.92 - 589.08
12:                               816.92 - 953.08
13:                              1321.85 - 1542.15
14:                              2138.77 - 2495.23
15:                              3460.62 - 4037.38
16:                              5599.38 - 6532.62
--|--------------------------------------|--------------------------------------
Previous:
Secure Boot
Next:
Folder Fuser
Scripts · Projects