Skip to content

Commit 4c25c42

Browse files
committed
Added UI
1 parent 0d8f176 commit 4c25c42

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

README.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
# enterprise-fibonacci
2-
Find the nth value of the fibonacci series
2+
Find the nth value of the fibonacci series. Suitable for enterprise solutions.
3+
4+
# How to Use
5+
- Run fib.py in terminal (linux) or the IDLE (windows)
6+
- Enter valid integer from 1 - ∞ (not inclusive of ∞)
7+
8+
# FAQs
9+
10+
#### Q: Why should I use this fibonacci generator?
11+
12+
A: It is *enterprise quality*, meaning that when you run fib.py, you aren't just getting a fibonacci generator using tuple unpacking or some other dumb technology list comprehension, you're only getting the best of a tried and true robust framework suitable for production code.
13+
14+
#### Q: Why is this repo so large? 30 Mb seems like a lot.
15+
16+
A: As mentioned before, this isn't something thrown together in 2 seconds for Project Euler, this is a robust, modular framework for fibonacci generation. And remember: *Bigger means more enterprise*.
17+
18+
#### Q: Is this reflective of your acutal coding ability?
19+
20+
A: This is just a joke. I swear.

src/lib/fib/generator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,8 @@ def solve(self):
226226

227227
elif equalToSym(s, '.'):
228228
try:
229-
self.l.log(toInt(int(chr(self.d.get(self.h.get().getInt())))))
229+
if self.l.log(toInt(int(chr(self.d.get(self.h.get().getInt()))))):
230+
break
230231
except:
231232
pass
232233

src/lib/fib/solver/logTracker.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,5 @@ def log(self, integer):
1414
self.p = toInt(plus(self.p, self.c.getOne()))
1515
if equalTo(self.p, self.n):
1616
print(integer.getInt())
17-
exit(0)
17+
return True
18+
return False

src/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
def main():
55
c = Const()
6-
g = Generator(5)
6+
g = Generator(int(input('Fibonacci: ')))
77
# print('---')
88
g.solve()

0 commit comments

Comments
 (0)