Re: [gingery_machines] New calculator

| | |

Tuesday, January 18, 2011

 

That is fine, right now they are doing a lot of work on 3.x to get it to the point that the larger community can move to 3.x. I only posted so that a person similarly set up could use the code. As it is right now 3.1.3 is the current version of 3 series Python with 3.2 "coming soon".

There is actually a command to make 2.7 more or less compatible with the 3.x series. That escapes me at the moment and since I'm on break at work I can't look it up.

What is interesting here is that I've had this idea to make an app for the iPhone that would handle these sorts of calculations for various technical pursuits. Sort of an automated reference book. Unfortunately I have lots of good ideas and little time. Oh well.

David A Frantz
websterindustro4at4mac.com

Sent from my iPhone.

On Jan 18, 2011, at 10:57 PM, Gordon Haag <mr.meker@gmail.com> wrote:

> I chose 2.7 because it has a wider use. When I downloaded it, python 3 was
> stiil at 3.1. I don't know where it is now, but I think I will wait for the
> next edition to come out.
>
> On Mon, Jan 17, 2011 at 5:45 PM, David Frantz <websterindustro@mac.com>wrote:
>
>>
>>
>> Hi Gordon;
>>
>> Your program is pretty neat. On My Mac I had to edit it some to get it to
>> work under Python 3.x. I'm partial to the 3.x release so I didn't even try
>> to run it under the 2.x series. So I will post it here for those interested.
>>
>>
>> running=1
>> print ("Lathe Speed Calculator -Imperial- by Mr.Meker")
>> """raw_input("Press <enter> to continue")"""
>> input("Press <enter> to continue")
>> while running==1:
>> print ("""
>> Aluminum (1)
>> Mild Steel (2)
>> Brass (3)
>> Custom Speed (4)
>>
>> """)
>> mat=input("Choose Material: ")
>> print(mat)
>>
>> if mat == "1":
>> print ("Aluminum")
>> elif mat == "2":
>> print ("Mild Steel")
>> elif mat == "3":
>> print ("Brass")
>> elif mat == "4":
>> sfm=input('Enter surface feet per minute: ')
>> else:
>> print ("invalid material")
>> break
>> if mat == "1" or mat == "2" or mat == "3":
>> print ("""
>> HSS (1)
>> Carbide (2)
>> """)
>> cut=input("Cutter type: ")
>> if cut == "1":
>> print ("Cutter: HSS")
>> elif cut == "2":
>> print ("Cutter: Carbide")
>> else:
>> print ("invalid cutter type")
>> break
>> dia=input("Enter Diameter (inches): ")
>>
>> if mat == "1":
>> if cut == "1":
>> sfm=300
>> if cut == "2":
>> sfm=2800
>> if mat == "2":
>> if cut == "1":
>> sfm=175
>> if cut == "2":
>> sfm=850
>> if mat == "3":
>> if cut == "1":
>> sfm=325
>> if cut == "2":
>> sfm=1100
>> rpm=12*sfm//(3.14*float(dia))
>> print ("RPM is: ", rpm)
>> goAgain = input("Run again? 1/0 ")
>> running=int(goAgain)
>>
>> As you can see very little has been changed. What has been done is as
>> follows:
>>
>> 1. Change the "print" statement to the new functional style.
>> 2. Add spacing at comparisons for readability and then did comparisons
>> against characters instead of number literals.
>> 3. Used float to convert "dia" from a string to a float.
>> 4. Modified the line with running to convert input form a string to an int
>> for the comparison.
>>
>> Most of this is 3.x PYTHON related stuff. It may be possible to mod your
>> program in a way compatible with both 2.x and 3.x PYTHON. I'm at the library
>> about to be kicked out (closing time) so will get back later!
>>
>> Dave
>>
>>
>> On Jan 16, 2011, at 8:17 PM000, Gordon Haag wrote:
>>
>>> Both are uploaded. I put a text file up of the code I wrote for the inch
>>> calculator. Writing code is really easy and fun. I have used it to solve
>>> lots of problems. Here is the code. It is in python 2.7. This language is
>>> the easiest to understand and is quite close to the english language. It
>> is
>>> free to download!
>>>
>>>
>>> running=1
>>> print "Lathe Speed Calculator -Imperial- by Mr.Meker"
>>> raw_input("Press <enter> to continue")
>>> while running==1:
>>> print """
>>> Aluminum (1)
>>> Mild Steel (2)
>>> Brass (3)
>>> Custom Speed (4)
>>>
>>> """
>>> mat=input("Choose Material: ")
>>> if mat==1:
>>> print "Aluminum"
>>> elif mat==2:
>>> print "Mild Steel"
>>> elif mat==3:
>>> print "Brass"
>>> elif mat==4:
>>> sfm=input('Enter surface feet per minute: ')
>>> else:
>>> print "invalid material"
>>> break
>>> if mat==1 or mat==2 or mat==3:
>>> print """
>>> HSS (1)
>>> Carbide (2)
>>> """
>>> cut=input("Cutter type: ")
>>> if cut==1:
>>> print "Cutter: HSS"
>>> elif cut==2:
>>> print "Cutter: Carbide"
>>> else:
>>> print "invalid cutter type"
>>> break
>>> dia=input("Enter Diameter (inches): ")
>>>
>>> if mat==1:
>>> if cut==1:
>>> sfm=300
>>> if cut==2:
>>> sfm=2800
>>> if mat==2:
>>> if cut==1:
>>> sfm=175
>>> if cut==2:
>>> sfm=850
>>> if mat==3:
>>> if cut==1:
>>> sfm=325
>>> if cut==2:
>>> sfm=1100
>>> rpm=12*sfm//(3.14*dia)
>>> print "RPM is: ", rpm
>>> running=input("Run again? 1/0 ")
>>>
>>> and there it is!
>>>
>>> On Sun, Jan 16, 2011 at 5:09 PM, Gordon Haag <mr.meker@gmail.com<mr.meker%40gmail.com>>
>> wrote:
>>>
>>>> I changed the first one, nothing major. I put my handle in it.
>>>> Metric will be uploaded in a few minutes.
>>>>
>>>> On Sun, Jan 16, 2011 at 4:56 PM, Gordon Haag <mr.meker@gmail.com<mr.meker%40gmail.com>>
>> wrote:
>>>>
>>>>> done writing it, now I just have to upload. Should be up in 10min or
>> so!
>>>>>
>>>>>
>>>>> On Sun, Jan 16, 2011 at 4:49 PM, Gordon Haag <mr.meker@gmail.com<mr.meker%40gmail.com>>
>> wrote:
>>>>>
>>>>>> Millimeters it is!
>>>>>>
>>>>>>
>>>>>> On Sun, Jan 16, 2011 at 4:48 PM, Matthew Tinker <mattinker@yahoo.com<mattinker%40yahoo.com>
>>> wrote:
>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> In the "Engineering" world, centimetres are rarely used. I work in
>>>>>>> millimetres except when I worm with some carpenters who use both!
>>>>>>>
>>>>>>> Regards, Mathew
>>>>>>>
>>>>>>> Matthew TINKER
>>>>>>>
>>>>>>> CNC conversion 1944 Colchester Lathe build-up log
>>>>>>>
>>>>>>> http://www.cnczone.com/forums/showthread.php?t=35519
>>>>>>>
>>>>>>> --- On Mon, 17/1/11, Gordon Haag <mr.meker@gmail.com<mr.meker%40gmail.com>
>> <mr.meker%40gmail.com>>
>>
>>>>>>> wrote:
>>>>>>>
>>>>>>> From: Gordon Haag <mr.meker@gmail.com <mr.meker%40gmail.com><mr.meker%
>> 40gmail.com>>
>>>>>>> Subject: Re: [gingery_machines] New calculator
>>>>>>> To: gingery_machines@yahoogroups.com<gingery_machines%40yahoogroups.com>
>> <gingery_machines%40yahoogroups.com>
>>>>>>> Date: Monday, 17 January, 2011, 1:45
>>>>>>>
>>>>>>>
>>>>>>> I should put the output in radians per second.
>>>>>>>
>>>>>>> Should the diameter be input in mm or cm? I don't know what is most
>>>>>>> convenient.
>>>>>>>
>>>>>>> On Sun, Jan 16, 2011 at 4:42 PM, Matthew Tinker <mattinker@yahoo.com<mattinker%40yahoo.com>
>> <mattinker%40yahoo.com>>
>>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Well, it could say Al, then everybody would be happy;-) (Even the
>>>>>>> French
>>>>>>>> who use Aluminium)
>>>>>>>>
>>>>>>>>
>>>>>>>> Regards, Matthew
>>>>>>>>
>>>>>>>> Matthew TINKER
>>>>>>>>
>>>>>>>> CNC conversion 1944 Colchester Lathe build-up log
>>>>>>>>
>>>>>>>> http://www.cnczone.com/forums/showthread.php?t=35519
>>>>>>>>
>>>>>>>> --- On Mon, 17/1/11, Gordon Haag <mr.meker@gmail.com<mr.meker%40gmail.com>
>> <mr.meker%40gmail.com>
>>>>>>> <mr.meker%40gmail.com>>
>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> From: Gordon Haag <mr.meker@gmail.com <mr.meker%40gmail.com><mr.meker%
>> 40gmail.com><mr.meker%
>>>>>>> 40gmail.com>>
>>>>>>>
>>>>>>>>
>>>>>>>> Subject: Re: [gingery_machines] New calculator
>>>>>>>> To: gingery_machines@yahoogroups.com<gingery_machines%40yahoogroups.com>
>> <gingery_machines%40yahoogroups.com><gingery_machines%
>>>>>>> 40yahoogroups.com>
>>>>>>>
>>>>>>>> Date: Monday, 17 January, 2011, 1:39
>>>>>>>>
>>>>>>>>
>>>>>>>> I suppose the metric version will have to say 'aluminium'!
>>>>>>>>
>>>>>>>> On Sun, Jan 16, 2011 at 4:31 PM, Rick Sparber <rgsparber@aol.com<rgsparber%40aol.com>
>> <rgsparber%40aol.com>
>>>>>>> <rgsparber%40aol.com>>
>>>>>>>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> How about doing it in furlongs per fortnight. Now THAT would be a
>>>>>>>> challenge
>>>>>>>>> ;-)
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Rick
>>>>>>>>>
>>>>>>>>> -----Original Message-----
>>>>>>>>> From: gingery_machines@yahoogroups.com<gingery_machines%40yahoogroups.com>
>> <gingery_machines%40yahoogroups.com>
>>>>>>> <gingery_machines%40yahoogroups.com>
>>>>>>>> <gingery_machines%40yahoogroups.com>
>>>>>>>>> [mailto:gingery_machines@yahoogroups.com<gingery_machines%40yahoogroups.com>
>> <gingery_machines%40yahoogroups.com>
>>>>>>> <gingery_machines%40yahoogroups.com>
>>>>>>>> <gingery_machines%40yahoogroups.com>]
>>>>>>>>> On Behalf Of Gordon Haag
>>>>>>>>> Sent: Sunday, January 16, 2011 5:27 PM
>>>>>>>>> To: gingery_machines@yahoogroups.com<gingery_machines%40yahoogroups.com>
>> <gingery_machines%40yahoogroups.com>
>>>>>>> <gingery_machines%40yahoogroups.com><gingery_machines%
>>>>>>>> 40yahoogroups.com>
>>>>>>>>> Subject: Re: [gingery_machines] New calculator
>>
>>>>>>>>>
>>>>>>>>> Do you really want one? It wouldn't be that hard.
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>> [Non-text portions of this message have been removed]
>>>>>>>>
>>>>>>>> ------------------------------------
>>
>>>>>>>>
>>>>>>>>
>>>>>>>> [Non-text portions of this message have been removed]
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> [Non-text portions of this message have been removed]
>>>>>>>
>>>>>>> ------------------------------------
>>
>>>>>>>
>>>>>>> [Non-text portions of this message have been removed]
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>>
>>> [Non-text portions of this message have been removed]
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>>
>>>
>>>
>>
>>
>>
>
>
> [Non-text portions of this message have been removed]
>
>
>
> ------------------------------------
>
>
>
>

__._,_.___
<*> Member map - Who and where we are.  Please add yourself so members can find each other.
http://groups.yahoo.com/group/gingery_machines/app/peoplemap/view/map
MARKETPLACE

Get great advice about dogs and cats. Visit the Dog & Cat Answers Center.


Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

No comments:

Post a Comment

 
Vida de bombeiro Recipes Informatica Humor Jokes Mensagens Curiosity Saude Video Games Mister Colibri Diario das Mensagens Eletronica Rei Jesus News Noticias da TV Artesanato Esportes Noticias Atuais Games Pets Career Religion Recreation Business Education Academics Style Television Programming Motosport Humor News The Games Home Downs World News Internet Car Design Entertaimment Celebrities 1001 Games Doctor Pets Net Downs World Enter Jesus Variedade Mensagensr Android Rub Letras Dialogue cosmetics Genexus Car net Só Humor Curiosity Gifs Medical Female American Health Madeira Designer PPS Divertidas Estate Travel Estate Writing Computer Matilde Ocultos Matilde futebolcomnoticias girassol lettheworldturn topdigitalnet Bem amado enjohnny produceideas foodasticos cronicasdoimaginario downloadsdegraca compactandoletras newcuriosidades blogdoarmario