title: Python: Write a program that asks the user for a color, a line width, a line length and a shape
body: <blockquote>
    <p>Write a program that asks the user for a color, a line width, a line length and a shape. The shape should be either a line, a triangle, or a square. Use turtle graphics to draw the shape that the user requests of the size, color, line width and line length that the user requests. For example, if these are the user choices for color, width, line length  and shape</p>
  </blockquote>
  
  <p>what color? blue<br>
  what line width? 25<br>
  what line length? 100<br>
  line, triangle or square? triangle</p>
  
  <p>This is my attempt:</p>
  
  <pre><code>color = input('Enter your preferred turtle line color: ') 
  width = input('Enter your preferred turtle line width: ')
  length = input('Enter your preferred turtle line length: ')
  shape = input('Specify whether you want to draw a line, triangle, or square: ')
  
  import turtle
  s = turtle.Screen()
  t = turtle.Turtle()
  t.pencolor(color)
  t.pensize(width)
  if shape == 'line':
      t.forward(length)
  
  elif shape == 'triangle':
      t.forward(length)
      t.right(45)
      t.forward(length)
      t.right(90)
      t.forward(length)
  
  else:
      t.forwad(length)
      t.right(90)
      t.forwad(length)
      t.right(90)
      t.forwad(length)
      t.right(90)
      t.forwad(length)
  </code></pre>
  
  <p>I receive this error:</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;pyshell#42&gt;", line 4, in &lt;module&gt;
      t.forward(length)
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 1637, in forward
      self._go(distance)
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 1604, in _go
      ende = self._position + self._orient * distance
    File "/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/turtle.py", line 257, in __mul__
      return Vec2D(self[0]*other, self[1]*other)
  TypeError: can't multiply sequence by non-int of type 'float'
  </code></pre>
  
  <p>Can someone please explain why the length in the forward commands won't go through?</p>