Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 09:45:35AM +, Alan Gauld via Tutor wrote: > On 25/12/17 09:08, Siddharth Sehgal wrote: > > >physics masters student. I am trying to use the Sellmeier Equation > > >I originally state them as floats. However such a process apparently > > >cannot be done with "floa

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 01:08:13PM +0400, Siddharth Sehgal wrote: > The actual equation is below screen shotted No it isn't -- either you forgot to attach it, or the mailing list removed it. Do you mean this equation? https://en.wikipedia.org/wiki/Sellmeier_equation I suggest you try using P

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Steven D'Aprano
On Mon, Dec 25, 2017 at 01:08:13PM +0400, Siddharth Sehgal wrote: > Hi there > > > I am a novice python user and am a physics masters student. I am > trying to use the Sellmeier Equation to calculate a refractive index. > The coefficients of this equation are decimals to a large number of > si

Re: [Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Alan Gauld via Tutor
On 25/12/17 09:08, Siddharth Sehgal wrote: physics masters student. I am trying to use the Sellmeier Equation I originally state them as floats. However such a process apparently > cannot be done with "floats" like these. It can be done just with a large error (although as a physics g

[Tutor] Hi there, have a question for a side project in physics.....

2017-12-25 Thread Siddharth Sehgal
Hi there I am a novice python user and am a physics masters student. I am trying to use the Sellmeier Equation to calculate a refractive index. The coefficients of this equation are decimals to a large number of sig figs ( i.e B1 = 1.03961212, B2 = 0.231792344, C1 = 6.00069867×10−3 ... and so

Re: [Tutor] Hi there,

2016-01-02 Thread Steven D'Aprano
On Sat, Jan 02, 2016 at 02:45:30PM +0200, yehudak . wrote: > I'm trying to write a Python 3.5 program to find how many trailing zeros > are in 100! (factorial of 100). > I downloaded factorial from Math module, but all my efforts to solve the > problem failed. > > I know the mathematical way to so

Re: [Tutor] Hi there,

2016-01-02 Thread Alan Gauld
On 02/01/16 12:45, yehudak . wrote: > I know the mathematical way to solve it (resulting in 24), but I want a > Python solution. Show us your code. Usually "the mathematical way to do it" works in Python too. Although there will likely be other ways that may sometimes run faster or easier to co

[Tutor] Hi there,

2016-01-02 Thread yehudak .
I'm trying to write a Python 3.5 program to find how many trailing zeros are in 100! (factorial of 100). I downloaded factorial from Math module, but all my efforts to solve the problem failed. I know the mathematical way to solve it (resulting in 24), but I want a Python solution. Thank you. ___

Re: [Tutor] Hi there :.)

2010-03-16 Thread Stefan Behnel
Alan Gauld, 15.03.2010 20:28: wrote (apparently python is slow ?!?). It is all relative. If you want to write fast moving graphics etc then yes, you probably need C++. For anything else you might find Python is fast enough. A good approach tends to be: write it in Python first, benchmark it

[Tutor] Hi there!

2010-03-16 Thread Marco Rompré
Hi! Does anyone of you know where to find all the solutions of Gerard Swinnen Python tutorial exercises In the tutorial we just have the solutions to half of the exercises. Thank you -- Marc-O. Rompré ___ Tutor maillist - Tutor@python.org To un

Re: [Tutor] Hi there :.)

2010-03-15 Thread Alan Gauld
wrote Just introducing myself to say hiHi! Hi welcome, but please don't include lots of attachments. It blows up people's mailboxes and bandwidth allowances. Better to post them on a website and send a link. I'm very new to programming, ... place to start I found out that python a

Re: [Tutor] Hi there :.)

2010-03-15 Thread Wayne Werner
On Mon, Mar 15, 2010 at 10:23 AM, wrote: > Hey, > Just introducing myself to say hiHi! > > I'm very new to programming, I got interested in it when I decided to have > a go at html. When looking around for a place to start I found out that > python and C++ are the usual starting place bu