title: when to use functions in python and when not to?
body: <p>I'm not understanding where I have to use a function and where I don't, for example, I tried to write this for the area of a rectangle and after hours of trying to figure out why I couldn't get it to execute properly I could just get rid of the very first line of code and it worked fine.</p>
  
  <pre><code>def area_rectangle(width,height):
  
      width=int(input("Enter the width of rectangle: "))
      height=int(input("Enter the height of rectangle: "))
      area=width*height
      print area
  </code></pre>
  
  <p>Thought I had to start it out like I did but it just wasn't working until I deleted the first line.</p>