From 0f859e133c4c9d6c071f15b54d1b03e7b68f0b21 Mon Sep 17 00:00:00 2001 From: Javon Hickmon Date: Sun, 18 Dec 2022 23:09:10 -0800 Subject: Added Javon's fibonacci function --- entries/jjhickmon/fibonacci.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 entries/jjhickmon/fibonacci.py diff --git a/entries/jjhickmon/fibonacci.py b/entries/jjhickmon/fibonacci.py new file mode 100644 index 0000000..7e9f5f6 --- /dev/null +++ b/entries/jjhickmon/fibonacci.py @@ -0,0 +1,14 @@ +def fib(index): + if (index < 0): + raise IndexError("Error: index must be >= 0") + + prev = 1 + curr = 1 + for _ in range(index - 1): + temp = curr + curr += prev + prev = temp + return curr + +if __name__ == "__main__": + print(fib(5)) -- cgit v1.2.3-70-g09d2 From b8725bdf91dad920ace294a7fb1a04db67115c68 Mon Sep 17 00:00:00 2001 From: Javon Hickmon Date: Sun, 18 Dec 2022 23:15:23 -0800 Subject: Added Javon as contributor --- people.json | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/people.json b/people.json index 67424df..943b4d5 100644 --- a/people.json +++ b/people.json @@ -743,5 +743,16 @@ "link": "./entries/williamvietnguyen/fibberoni.c" } ] - } + }, + { + "github": "jjhickmon", + "name": "Javon Hickmon", + "title": "Undergraduate CS Student, UW", + "entries": [ + { + "name": "fibonacci", + "link": "./entries/jjhickmon/fibonacci.py" + } + ] + }, ] -- cgit v1.2.3-70-g09d2 From ebd167d36dd376e7ce83cb6858c6fd396f0b3ecd Mon Sep 17 00:00:00 2001 From: Javon Hickmon Date: Mon, 19 Dec 2022 01:23:39 -0800 Subject: Fixed people.json for Javon --- people.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/people.json b/people.json index 943b4d5..ea6f724 100644 --- a/people.json +++ b/people.json @@ -754,5 +754,5 @@ "link": "./entries/jjhickmon/fibonacci.py" } ] - }, + } ] -- cgit v1.2.3-70-g09d2