range as input in python
<p>this is a simple program for Fibonacci series . its running perfectly for fixed range. but i would like to know is it possible to get range as input? if so please let me know the syntax to get range as input. </p>

<pre><code>xx=0

x=float (raw_input("enter the starting number:"))

r1=xx+x

print r1

r2=r1+x

print r2

r3=r1+r2

print r3

for i in range(10):

     r4=r2+r3

     print r4

     r2=r3

     r3=r4
</code></pre>

<p>""" looking for answers"""</p>

<p>Do it like you asked for the starting number:</p>

<pre><code>number_of_outputs = int( raw_input('Enter the number of outputs: '))

#Your code goes here

for i in range(number_of_ouputs):

    #More code goes here
</code></pre>

python fibonacci