title: TypeError: takes one positional argument but five were given
body: <pre><code>def double_preceding(values):
  
      '''(list of ints)-&gt;None
  
      Update each value in a list with twice
      the preceding value, and the first item
      with 0.
  
      For example, if x has the value
      [1,2,3,4,5], after calling the
      double_preceding with argument x,
      x would have the value[0,2,4,6,8]
  
      &gt;&gt;&gt;double_preceding(2,3,4,5,6)
      [0,4,6,8,10]
      &gt;&gt;&gt;double_preceding(3,1,8,.5,10)
      [0,6,2,16,1] 
      '''
      if values != []:
          temp = values[0]
          values[0] = 0
          for i in range(0, len(values)):
              double = 2 * temp
              temp = values[i]
              values[i] = double
      return #None
  </code></pre>
  
  <p>So what am I doing wrong? I don't see a problem anywhere and I've been trying to fix it for an hour now.</p>
  
  <p>I fixed the code:</p>
  
  <pre><code>def double_preceding(values):
  
      if values != 0:  
              temp = values[0]
              values[0] = 0
           for i in range(1, len(values)):
                 double = 2 * temp
                 temp = values[i]
                 values[i] = double
      print(values)
      return#None
  </code></pre>