I am unable to create a HTML Table with this just what exactly am I doing wrong or what should I add to make this work. please help I just don't understand anymore.
Also this code is to generate a Fibonacci sequence from 0-50 and also display them in columns in a table.
A decimal column, hex column, oct column and a float with point precision of 2.
#!/usr/local/bin/python3
print('Content-type: text/html\n')
def fib(n):
a, b = 0, 1
for i in range(n):
a, b = b, a + b
return a
Index Number | Decimal | Hexadecimal | Octadecimal | float |
---|
for i in range (0, 51):
ifib(i)hex(fib(i))oct(fib(i))'%.2f' % float(fib(i))