Re: [Tutor] Exponential function

2017-02-14 Thread eryk sun
On Tue, Feb 14, 2017 at 11:01 PM, Alan Gauld via Tutor wrote: > To compute it if you don't know x in advance then yes, > use something like > > value = 10**x > > But if you know the value in advance you can write it in > a more compact form as: > > value = 1e5 # or 3e7 or whatever... 10**5 is an

Re: [Tutor] Tutor Digest, Vol 156, Issue 33

2017-02-14 Thread Alan Gauld via Tutor
As per my offline reply, just send messages to the list and the whole group will act as a virtual mentor. One other thing though. Please start new topics with a new message. Do NOT reply to an existing thread as it messes up the archives. And especially do not reply to a digest message. And use a

Re: [Tutor] Exponential function

2017-02-14 Thread Alan Gauld via Tutor
On 14/02/17 12:03, Aaliyah Ebrahim wrote: > For the function 1*10^x, is there a specific way of computing *10^x or will > it just be the following : > > 1*10**x To compute it if you don't know x in advance then yes, use something like value = 10**x But if you know the value in advance you can

Re: [Tutor] Tutor Digest, Vol 156, Issue 33

2017-02-14 Thread Borisco Bizaro
Please l will like to have a mentor how can I have it On Feb 14, 2017 09:53, wrote: > Send Tutor mailing list submissions to > tutor@python.org > > To subscribe or unsubscribe via the World Wide Web, visit > https://mail.python.org/mailman/listinfo/tutor > or, via email, send a me

[Tutor] Exponential function

2017-02-14 Thread Aaliyah Ebrahim
Hi For the function 1*10^x, is there a specific way of computing *10^x or will it just be the following : 1*10**x Thank you. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo

Re: [Tutor] NameError: name 'hurst' is not defined

2017-02-14 Thread Alan Gauld via Tutor
On 14/02/17 10:11, Alan Gauld via Tutor wrote: ts.adfuller(goog['Adj Close'], 1 > > there seems to be a missing closing paren here? > Also where does 'ts' come from, its not defined above? Ah! I see from Peters post that I missed the first line of code. But I still see a missing ')'... --

Re: [Tutor] NameError: name 'hurst' is not defined

2017-02-14 Thread Peter Otten
Allan Tanaka via Tutor wrote: > Hi. Not sure why this code produces the error like this. This error > appears when i run the code of print "Hurst(GBM): %s" % hurst(gbm): > Traceback (most recent call last): File "", line 1, in > print "Hurst(GBM): %s" % hurst(gbm)NameError: name 'hurst' >

Re: [Tutor] NameError: name 'hurst' is not defined

2017-02-14 Thread Alan Gauld via Tutor
On 14/02/17 01:55, Allan Tanaka via Tutor wrote: > Hi. Not sure why this code produces the error like this. This error appears > when i run the code of print "Hurst(GBM): %s" % hurst(gbm): > Traceback (most recent call last): File "", line 1, in > print "Hurst(GBM): %s" % hurst(gbm)Name

Re: [Tutor] Q about .join() Thanks!

2017-02-14 Thread Joaquin Alzola
>I find out that the outcome for using .join() on a dictionary is totally >different than it using on list or string. for example, > >>> seq4 = {'hello':1,'good':2,'boy':3,'doiido':4} > >>> > boy:good:doiido:hello >So my question is why the outco

[Tutor] NameError: name 'hurst' is not defined

2017-02-14 Thread Allan Tanaka via Tutor
Hi. Not sure why this code produces the error like this. This error appears when i run the code of print "Hurst(GBM):   %s" % hurst(gbm):  Traceback (most recent call last):  File "", line 1, in     print "Hurst(GBM):   %s" % hurst(gbm)NameError: name 'hurst' is not defined Here is the full code

Re: [Tutor] Q about .join() Thanks!

2017-02-14 Thread Peter Otten
Danny Yoo wrote: > Moreover, most implementations *deliberately* randomize their iteration > order to avoid a particular kind of hash collision attack out there in > the wild. See: In CPython the hash() of a string may change between different runs to fend off hash collision attacks, but that