[Tutor] Function behavior

2010-09-16 Thread Ken Green
I am unclear on the behavior of using a function. Below is a short code I wrote to print an amount out after inputting the number of match. # TEST Function.py def change(amount): if match == 1: amount = 0 if match == 2: amount = 0 if match == 3: amount = 3

Re: [Tutor] Function behavior

2010-09-17 Thread Ken Green
Thanks Alan. With suggestion and help from several other people on the list, I was able to solve the problem. I learned from an example previously given. I am using several different tutorials and I have yours bookmarked. Ken On 09/16/2010 05:26 PM, Alan Gauld wrote: "Ken Green&qu

Re: [Tutor] Function behavior (SOLVED)

2010-09-17 Thread Ken Green
Thank you. This will be printed out and studied. Amazing of what Python can do. Ken On 09/17/2010 06:10 PM, bob gailer wrote: On 9/16/2010 8:18 AM, Ken Green wrote: I am unclear on the behavior of using a function. Below is a short code I wrote to print an amount out after inputting the

Re: [Tutor] IDE for Python

2010-10-07 Thread Ken Green
I have been using Geany under Ubuntu 10.04. I rarely use IDLE. Ken On 10/07/2010 11:23 AM, Juan Jose Del Toro wrote: Dear List; In your experience what is the best IDE for Python? I've used SPE and IDLE, I've also seen people using Eclipse but which one do you recommend? -- ¡Saludos! / Gr

Re: [Tutor] syntax error that i cant spot!

2011-01-01 Thread Ken Green
I am caught off guard but what is the purpose of the plus sign? I don't recall seeing it used like that. Ken On 01/01/2011 12:11 PM, Abhijeet Rastogi wrote: You missed a "+" after myName on line 30. On Sat, Jan 1, 2011 at 10:32 PM, pete > wrote: Hi, Please

Re: [Tutor] syntax error that i cant spot!

2011-01-01 Thread Ken Green
He had no space between the plus sign and the name value and that threw me. I am so used to using a space before or after the plus sign. Ken On 01/01/2011 02:46 PM, bob gailer wrote: On 1/1/2011 2:28 PM, Ken Green wrote: I am caught off guard but what is the purpose of the plus sign? I

Re: [Tutor] syntax error that i cant spot!

2011-01-02 Thread Ken Green
I generally prefer Camel Case as easily to use as it would be more difficult for me as a touch typist to hunt and peck for the underscore. Ken On 01/02/2011 09:40 AM, Brett Ritter wrote: On Sat, Jan 1, 2011 at 9:10 PM, Alan Gauld wrote: Why avoidCamelCase? I actually prefer it to using_non_c

Re: [Tutor] Calaculating a monthly total of earning

2011-01-16 Thread Ken Green
Alan, the last two paragraphs you wrote is classic. Very, very true. LOL. Ken On 01/16/2011 07:32 PM, Alan Gauld wrote: Python is so tempormential what is wrong with my code? Python is not temperamental, it is just doing exactly what you ask it to do. It makes no judgement about whether

[Tutor] What is day of week from either 20180211 or 02112018

2018-02-06 Thread Ken Green
Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program below. Running Python 2.7 on Ubuntu 16.04. Thanks. ===

Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:20 PM, David Rock wrote: On Feb 6, 2018, at 13:45, Ken Green wrote: Traceback (most recent call last): File "A_Weekday.py", line 20, in answer = datetime.date(year, month, day).weekday() NameError: name 'datetime' is not defined Your error m

Re: [Tutor] What is day of week from either 20180211 or 02112018 (SOLVED)

2018-02-06 Thread Ken Green
On 02/06/2018 03:36 PM, Mark Lawrence wrote: On 06/02/18 19:45, Ken Green wrote: Greeting: I have been trying to determine the day of the week when inputting year + month + date. I have not yet been able to determine what is really needed for datetime and later on the date in the program

[Tutor] Installing Python v3 on a laptop Windows 10

2019-06-15 Thread Ken Green
It has been some 18 months that I last installed Python onto my laptop Windows. Having had freshly completely reinstalled Windows 10 and its various updates. I already installed PSREdit500 successfully several weeks ago, I am now ready to install Python, preferable the latest version of Python 3.

Re: [Tutor] Installing Python v3 on a laptop Windows 10 (SOLVED)

2019-06-17 Thread Ken Green
On 15/06/2019 22:23, Ken Green wrote: I understood there is a preferable method of installing Python into Windows. I pray tell on how about to do it, gentlemen. Thank you gentlemen for the prompt responses to my inquiry. I believe it would be best for me to use the ActiveState installation