less copy protection, more size visualization
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

12 lines
211 B

  1. # calculates the diameter in pixels for the inner part of a pipe
  2. import sys
  3. size = 500
  4. od = float(sys.argv[1])
  5. id = float(sys.argv[2])
  6. thickness = (od - id) / 2
  7. print("{0:2f}".format(thickness * size / od))