[Tutor] (no subject)

2015-07-25 Thread Job Hernandez
I have been reading a book on Python. I am currently stuck with one of the exercises and so wanted to ask you if you can help me. Of course, if you have the time. Exercise : Ask the user to input 3 integers and prints out the largest odd number. if no odd number was entered it should print a

Re: [Tutor] (no subject)

2015-07-25 Thread Alan Gauld
On 25/07/15 02:49, Job Hernandez wrote: These lines of code don't work : a = raw_input('enter number: ') b = raw_input('enter number: ') c = raw_input('enter number: ') raw_input() returns a string. So if you enter 6, say, it is stored as the character '6' not the number 6. You need to use

[Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread boB Stepp
After having a long discussion with my wife on her user requirements, I am convinced that an OO approach is required. Which is just as well as that has been one of my next areas of learning to do. I am currently reading Python 3 Object Oriented Programming by Dusty Phillips, which so far seems

Re: [Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread Laura Creighton
In a message of Sat, 25 Jul 2015 16:08:03 -0500, boB Stepp writes: After having a long discussion with my wife on her user requirements, I am convinced that an OO approach is required. Which is just as well as that has been one of my next areas of learning to do. I am currently reading Python 3

[Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread Zachary Ware
On Saturday, July 25, 2015, boB Stepp robertvst...@gmail.com javascript:_e(%7B%7D,'cvml','robertvst...@gmail.com'); wrote: 5) __name__ is meant to be used only by the creators of Python for their special built-in methods, such as __init__, __new__, etc. Everything up to this point was pretty

[Tutor] How to generate a pure tones and random noise using Python?

2015-07-25 Thread Paul Z
Hi All, I try to train my listening by using python. (estimating the frequency of sound) So... Are there some way to generate a fixed frequency sound in different waves (eg. Sine Wave, Saw Wave, Triangle Wave etc.) and different random noise. (eg. white noise pink noise) ? I have search in

Re: [Tutor] How to generate a pure tones and random noise using Python?

2015-07-25 Thread Laura Creighton
In a message of Sat, 25 Jul 2015 19:15:31 +0800, Paul Z writes: Hi All, I try to train my listening by using python. (estimating the frequency of sound) So... Are there some way to generate a fixed frequency sound in different waves (eg. Sine Wave, Saw Wave, Triangle Wave etc.) and different

Re: [Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread Mark Lawrence
On 25/07/2015 22:08, boB Stepp wrote: After having a long discussion with my wife on her user requirements, I am convinced that an OO approach is required. Which is just as well as that has been one of my next areas of learning to do. I am currently reading Python 3 Object Oriented Programming

Re: [Tutor] _ vs. _name vs. __name vs. name_ vs. __name__ usages

2015-07-25 Thread Ben Finney
boB Stepp robertvst...@gmail.com writes: From my understandings to date: 1) A single underscore is used conventionally for a throw-away variable, such as a loop index for which the index value is not actually used in a subsequent calculation. That accurately describes common usage. But it's

Re: [Tutor] Socket Module

2015-07-25 Thread Nym City via Tutor
Thank you all for your responses. I have taken your feedback and made changes to my code. -Danny, per your suggestion, I have renamed some of my variables to make their purpose little more clearer. - Alan,  I have created a new host list (ResolvedAddresses) which is storing the output from