Re: [Tutor] How to calculate the cumulative normal distribution

2015-10-02 Thread Oscar Benjamin
On Wed, 30 Sep 2015 10:14 Laura Creighton wrote: In a message of Wed, 30 Sep 2015 09:12:20 +0300, Michel Guirguis writes: >Good afternoon, > >How to calculate the cumulative normal distribution function CND in order to use this figure to calculate the call option based on the

[Tutor] Exception Handling

2015-10-02 Thread Nym City via Tutor
Hello, I am trying to get IP addresses for about 500 public domains but I think for some where resolution is not available - my exception handling breaks the code.  To troubleshoot, I added several Print statements to see what I was getting and it looks like my blank list is getting populated

Re: [Tutor] Mutable data type in python

2015-10-02 Thread Alan Gauld
On 02/10/15 17:52, Anshu Kumar wrote: When we invoke the same function inside a function (recursive function), i want to keep track of some data across all function invocation so i should have shareable type but built in data types string, int are not helping as they are immutable they are

[Tutor] Quick Programming Question

2015-10-02 Thread Jared Johnson via Tutor
I've been stuck on this for a while now and was wondering if you could help. The question is: "A pentagonal number is defined as n(3n - 1)/2 for n = 1,2 etc. So, the first few numbers are 1, 5, 12, 22 etc. Write a function with the following header that returns a pentagonal number: def

[Tutor] Mutable data type in python

2015-10-02 Thread Anshu Kumar
Hi Everyone, I have been facing this problem from a while in python could I please be helped? When we invoke the same function inside a function (recursive function), i want to keep track of some data across all function invocation so i should have shareable type but built in data types string,

Re: [Tutor] Quick Programming Question

2015-10-02 Thread Alan Gauld
On 02/10/15 17:41, Jared Johnson via Tutor wrote: "A pentagonal number is defined as n(3n - 1)/2 for n = 1,2 etc. Write a function with the following header that returns a pentagonal number: def getPentagonalNumber(n): It's asking you to write a function that returns the result of the

Re: [Tutor] Exception Handling

2015-10-02 Thread Alan Gauld
On 02/10/15 23:57, Nym City via Tutor wrote: socket.gaierror: [Errno 11004] getaddrinfo failed ... for name in ListOfHostNames: try: ResolveHostname = socket.gethostbyname(name) print(ResolveHostname) newFile.write(ResolveHostname + "\n")

Re: [Tutor] Mutable data type in python

2015-10-02 Thread Cameron Simpson
On 02Oct2015 22:22, Anshu Kumar wrote: When we invoke the same function inside a function (recursive function), i want to keep track of some data across all function invocation so i should have shareable type but built in data types string, int are not helping as they

Re: [Tutor] Exception Handling

2015-10-02 Thread Cameron Simpson
On 03Oct2015 00:51, ALAN GAULD wrote: On 02/10/15 23:57, Nym City via Tutor wrote: socket.gaierror: [Errno 11004] getaddrinfo failed ... for name in ListOfHostNames: try: ResolveHostname = socket.gethostbyname(name) print(ResolveHostname)