Attachment 'Lumen_3.py'

Download

   1 # Lumen
   2 #
   3 # A basic light level calculation program
   4 #
   5 # Created as part of a tutorial for assisting Engineers
   6 # to learn programming with Python
   7 #
   8 # Copyright (c) 2006 to Ted Bell ted dot bell at lineone dot net
   9 # Distributed free and without warranty of any kind
  10 # 
  11 
  12 
  13 # Begin by estimating the number of fittings required.
  14 
  15 e = input("Enter the light level required in Lux ")
  16 l = input("Enter the length of the room ")
  17 w = input("Enter the width of the room ")
  18 a = l*w
  19 f = input("Enter the bare lamp lumens per fitting ")
  20 uf = 0.85 # we can amend this to generate a number at a later stage.
  21 n = (e*a)/(f*uf)
  22 print round(n)
  23 
  24 
  25 # Now calculate the actual light level.
  26 
  27 N = input("Enter actual number of luminaires to be used ")
  28     # we can use capital n here as Python treats n and N as two values.
  29 llf = input("Enter light loss factor ")
  30     # we can revisit this at a later stage and break it down into parts.
  31 E = (N*f*uf*llf)/a
  32     # Again we can use capital E here to distinguish it.
  33 print E

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2009-10-04 09:16:03, 0.1 KB) [[attachment:Lumen_1.py]]
  • [get | view] (2009-10-04 09:16:03, 0.1 KB) [[attachment:Lumen_1a.py]]
  • [get | view] (2009-10-04 09:16:03, 0.1 KB) [[attachment:Lumen_1b.py]]
  • [get | view] (2009-10-04 09:16:03, 0.2 KB) [[attachment:Lumen_2.py]]
  • [get | view] (2009-10-04 09:16:03, 1.0 KB) [[attachment:Lumen_3.py]]
  • [get | view] (2009-10-04 09:16:03, 3.2 KB) [[attachment:Lumen_4.py]]
  • [get | view] (2009-10-04 09:16:03, 3.6 KB) [[attachment:bike.ico]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.

NOTE: To edit pages in this wiki you must be a member of the TrustedEditorsGroup.