How to change speed at which text is printed (python)
<p>What I am trying to accomplish is first text appears after 1 second. then 2, ect. till 10. then when time equals 10, the time decreases, so the text appears after 9 seconds, then 8 etc.</p>

<p>How could I fix this code so that it works properly?</p>

<p>The error:</p>

<pre><code>Traceback (most recent call last):
  File "C:/Users/Eric/Dropbox/time.py", line 13, in &lt;module&gt;
    time.sleep(time)
AttributeError: 'int' object has no attribute 'sleep'
</code></pre>

<p>The code :</p>

<pre><code>import time
x = 1
t = 1
time = t + 1
while x == 1:


    print time
    if time &gt;=10:
        time = t - 1
    elif time &lt;= 0:
        time = t + 1
    time.sleep(time)
</code></pre>

<hr>

<p>Edit:</p>

<pre><code>import time
x = 1
t = 1
time1 = 0
while x == 1:

    if time1 == 10:
        time1 = time1 - 1
    elif time1 == 0:
        time1 = time1 + 1
    else :
        time1 = time1 + 1
    print time1
    time.sleep(time1)
</code></pre>

<p>So I changed the program around abit, so I almost works correctly. What it does is count to 10, then 9 then back to 10.
ex. 1,2,3,4,5,6,7,8,9,10,9,10,9,10
how can I set it so that the program increases time to ten then decreases to zero then increases again?</p>
