
March 2nd, 2004, 02:54 PM
|
|
Contributing User
|
|
Join Date: Feb 2004
Posts: 30
Time spent in forums: < 1 sec
Reputation Power: 10
|
|
Does this look right for what I want to do??!!??
I am trying to right a program that allows you to type in any number and it will start at 1 and keep doubleing till it gets to the number just for fun.
Code:
def fib(n)
input = "Pick a Number", x
a, b = 0, 1
while b < n
print b;
a, b = b, a+b
fib(x)
|