title: can't multiply sequence by non-int of type float?
body: <p>I've been asked to write a simulator, the end goal being to see how much ink ends up on a cylinder at the end of a chain of maybe 15 or so rollers. I'm currently trying to set-up a dictionary which defines the rollers. From this i wanted to write a function which will take user input, 'roller_diameter', find the ratio of the given diameter to a fixed diameter and convert this into an integer number of 'segments'. I'm not a programmer (i'm learning Python[2.7] using internet resources) and am struggling with the TypeError: can't multipy sequence by non-int type 'float'
  I'm sure this is a trivial issue and I have looked at the related answers but have been unable to understand what specifically I'm doing wrong...Any suggestions would be greatly appreciated, here's the code (with only a few 'rollers'), please don't laugh...</p>
  
  <pre><code>Rubber = True  
  Copper = False  
  CW = 1  
  ACW = -1  
  num_rollers = 4  
  plate_diameter = 406.4  
  
  rollers = [{} for i in range(num_rollers)]  
  rollers[0] = {'top_seg': 0, 'roller_diameter': [], 'segments': [], 'material': Copper, 'direction': ACW, 'ink': []}  
  rollers[1] = {'top_seg': 0, 'roller_diameter': [], 'segments': [], 'material': Rubber, 'direction': CW, 'ink': []}  
  rollers[2] = {'top_seg': 0, 'roller_diameter': [], 'segments': [], 'material': Copper, 'direction': ACW, 'ink': []}  
  rollers[3] = ['top_seg': 0, 'roller_diameter': [], 'segments': [], 'material': Rubber, 'direction': CW, 'ink': []}  
  
  R = rollers[i]  
  
  def roller_data():  
      global roller_diameter  
      roller_diameter = float(raw_input("Enter the roller diameter" + str(i) + ': '))
  
  for i in range(num_rollers):  
      roller_data()  
  R['segments'] = int(round(rollers[3]['segments']*roller_diameter/plate_diameter))  
  R['angle'] = (360.0/R['segments'])  
  
  print rollers[3]['segments']
  </code></pre>
  
  <p>The TraceBack is: </p>
  
  <pre><code>Traceback (most recent call last):
  File "\\datasvr\users\rioliver\Python2.7\dict_test_v2.py", line 24, in &lt;module&gt;
  R['segments'] = int(round(rollers[3]['segments']*roller_diameter/plate_diameter))
  TypeError: can't multiply sequence by non-int of type 'float'
  </code></pre>
  
  <p>When you run this code it doesn't matter what you enter for diameter (I have been using 85, 95, 110, 120) but it makes no difference what numbers are used. I would like it to take any number (integer or floating point) and round any floating points.</p>