[Tutor] A couple newbie questions about Python

2014-06-11 Thread Deb Wyatt
Hi.  Everywhere I have read, the 'standard practice' for indentation is 4 
spaces, but I am running into 2 space indentation in a lot of tutorials and 
such.  Should I keep with the 4 spaces, or does it even matter, as long as it 
is consistent?

I just recently became aware of the inaccuracy of calculations using floats and 
I am concerned about that.  

I am using Python 3, just fyi.

Thanks for any enlightenment on these questions.

Deb in WA, USA


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] A couple newbie questions about Python

2014-06-12 Thread Deb Wyatt

Thanks very much Alan.  As for the my concern about inaccuracy in float math, I 
suppose I am concerned because I was not aware of the issue before, and I 
wonder how you deal with such things when you need accuracy for financial 
things.

Deb in WA, USA


> -Original Message-
> From: alan.ga...@btinternet.com
> Sent: Wed, 11 Jun 2014 23:48:37 +0100
> To: tutor@python.org
> Subject: Re: [Tutor] A couple newbie questions about Python
> 
> On 11/06/14 21:46, Deb Wyatt wrote:
>> Hi.  Everywhere I have read, the 'standard practice' for indentation is
>> 4 spaces,
> 
> That's a style recommendation. Python doesn't care.
> But your readers will. 2 spaces is the absolute minimum,
> 8 spaces is about the absolute maximum. Outside that it
> gets hard to read the code.
> 
> 3, 4 or 5 spaces is pretty good and you are unlikely
> to get complaints except from style pedants or if you
> are submitting code for the standard library where they
> like to stick with the official guidance.
> 
> 
>> I just recently became aware of the inaccuracy of calculations using
>> floats
>  > and I am concerned about that.
> 
> The inaccuracies are an inevitable result of the way your computer
> processes floating point numbers.
> 
> In what way are you concerned? Its not a Python issue - the exact same
> issues occur in any computer - or even your pocket calculator.
> If it concerns you in Excel or in Visual Basic/Java/C++ etc too then the
> good news is that Python has alternative renderings that can often
> reduce/eliminate them - but at the cost of speed and complexity.
> 
> 
> HTH
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.flickr.com/photos/alangauldphotos
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


Protect your computer files with professional cloud backup.
Get PCRx Backup and upload unlimited files automatically. 
Learn more at http://backup.pcrx.com/mail


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] MIT - Free Python course started today

2014-06-13 Thread Deb Wyatt
oh cool.  I actually started taking this here:
http://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-00sc-introduction-to-computer-science-and-programming-spring-2011/

But to have access to a forum and other people taking it at the same time will 
be wonderful.  thank you for posting this.  Signing up right now :).

Deb in WA, USA


> -Original Message-
> From: mari...@gmx.com
> Sent: Wed, 11 Jun 2014 16:42:01 -0600
> To: tutor@python.org
> Subject: [Tutor] MIT - Free Python course started today
> 
> Sort of off topic, (don't kill me) but then again very useful for
> beginners!
> 
> MIT started free Python course today:
> 
> https://www.edx.org/course/mitx/mitx-6-00-1x-introduction-computer-1841
> 
> Unfortunately they are using Python 2.7 :-(
> You can even get a certificate if you finish with high enough score
> (will cost you something for certificate)
> 
> Anyway, even if partially off topic I think it may be beneficiary for
> some beginners here. I'm already going through the lessons :-)
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] A couple newbie questions about Python

2014-06-13 Thread Deb Wyatt
> -Original Message-
> From: breamore...@yahoo.co.uk
> Sent: Thu, 12 Jun 2014 09:18:16 +0100
> To: tutor@python.org
> Subject: Re: [Tutor] A couple newbie questions about Python
> 
> Please don't top post, it makes following a long thread extremely
> difficult, thanks.
> 
sorry.  The other python list wants you to, so I just assumed...

Deb in WA, USA

She says as she almost top posts again :P...


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Strange issue output not showing up as floats

2014-06-21 Thread Deb Wyatt
Hello.  I hope everyone is having a good day.  I am working on an assignment 
that is supposed to output floats.  I'm using floats in the computations and 
according to Python's rules the output should be floats, but it's not.  When I 
test in Python shell the calculations display correctly, as floats.

I'm using Python 2.7 for this assignment.

input is as follows  (not in code order):
balance = 4213
annualInterestRate = 0.2
monthlyPaymentRate = 0.04
payment = monthlyPaymentRate * balance
balance = balance - payment
total_paid = payment

output looks like this:

Month: 1
Minimum monthly payment: 168
Remaining balance: 4111
Month: 2
Minimum monthly payment: 164
Remaining balance: 4013
Month: 3
Minimum monthly payment: 160
Remaining balance: 3916
...etc...

Would any of you have a clue what could be wrong?
Deb in WA, USA


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] regarding my strange issue output not showing up as floats

2014-06-21 Thread Deb Wyatt
never mind.  I figured it out.  I was using %d instead of %f in my print 
statements.  duh.

Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Strange issue output not showing up as floats

2014-06-23 Thread Deb Wyatt
> 
> Not if you don't show us your code!
> 
>  > never mind.  I figured it out.  I was using %d instead
>  > of %f in my print statements.  duh.
> 
> 'duh', indeed but how could we possibly have helped since
> you didn't post any print statements?
> 
> In future post real code, real output and real errors.
> That way we have some chance of helping you.
> 
> --
I know, i'm sorry.  I was avoiding posting the actual code because it was an 
assignment,
and I did not want this to be construed as cheating. I was just looking for 
possible ideas
of what could possibly be wrong, but not posting the print statement made it 
impossible
for any of you to see my 'duh' error.

I was really hoping the moderator would see the second message and not send 
either message to the group.  How long does it take to get off of moderation?


Deb in WA, USA


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] What are your favourite unofficial resources

2014-06-29 Thread Deb Wyatt



> -Original Message-
> From: alan.ga...@btinternet.com
> Sent: Sun, 29 Jun 2014 23:41:45 +0100
> To: tutor@python.org
> Subject: [Tutor] What are your favourite unofficial resources
> 
> I'm looking for tips for an appendix to a book that
> I'm working on.
> 
> What are the best unofficial (ie not python.org)
> resources for people who have learned the basics
> but are not experts yet? ie Typical tutor list
> "graduates"...
> 
> I'm thinking about web sites, blogs, books, videos etc.
> Anything that might be worth knowing about.
> 
> I've got a few of my own - Activestate, O'Reilly,
> ByteOfPython, PythonChallenge, ShowMeDo etc.
> 
> But I thought the tutor list readers might be an
> interesting source of alternatives that I hadn't
> thought of, or even heard of.
> 
> All contributions considered :-)
> 
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
> http://www.flickr.com/photos/alangauldphotos
> 
> ___
> Tutor maillist  -  Tutor@python.org
> To unsubscribe or change subscription options:
> https://mail.python.org/mailman/listinfo/tutor

codecademy.com, codingbat.com, checkio.com

Head First Python.  There are some more books but I can't think of them right 
now. 

Deb in WA, USA


Protect your computer files with professional cloud backup.
Get PCRx Backup and upload unlimited files automatically. 
Learn more at http://backup.pcrx.com/mail


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] Why is Quick Search at docs.Python.org so useless?

2014-07-05 Thread Deb Wyatt
I am betting that a big reason newbies don't go straight to documentation for 
answers is because of the useless quick search.  You should be able to type 
'dictionary' and get links to the dictionary info.  You get a bunch of links 
that are meaningless to someone who wants to learn about how to use 
dictionaries.  It frustrates me to death when I want to look up a detail about 
how a particular function works and I can't find it because quick search 
doesn't provide the link to the BASIC information.

Another example of what I am talking about, I just did a search of max(), a 
BUILT-IN function.  This is what quick search gives me:

Your search did not match any documents. Please make sure that all words are 
spelled correctly and that you've selected enough categories.

What is up with that???

I realize that this list doesn't have control over python.org, but there are 
enough of you who are experts about all this stuff that maybe some changes can 
be made.  If I ever learn enough, I hope to be part of the solution myself.  A 
working search engine would be most helpful.

Yes, I use Google all that time. But quick search should be useful. Thanks in 
advance for any insights and help.
  

Deb in WA, USA


Receive Notifications of Incoming Messages
Easily monitor multiple email accounts & access them with a click.
Visit http://www.inbox.com/notifier and check it out!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Why is Quick Search at docs.Python.org so useless?

2014-07-05 Thread Deb Wyatt

> -Original Message-
> From: breamore...@yahoo.co.uk
> Sent: Sat, 05 Jul 2014 19:26:41 +0100
> To: tutor@python.org
> Subject: Re: [Tutor] Why is Quick Search at docs.Python.org so useless?
> 
> On 05/07/2014 18:31, Deb Wyatt wrote:
>> I am betting that a big reason newbies don't go straight to
>> documentation for answers is because of the useless quick search.  You
>> should be able to type 'dictionary' and get links to the dictionary
>> info.  You get a bunch of links that are meaningless to someone who
>> wants to learn about how to use dictionaries.  It frustrates me to death
>> when I want to look up a detail about how a particular function works
>> and I can't find it because quick search doesn't provide the link to the
>> BASIC information.
>> 
>> Another example of what I am talking about, I just did a search of
>> max(), a BUILT-IN function.  This is what quick search gives me:
>> 
>> Your search did not match any documents. Please make sure that all words
>> are spelled correctly and that you've selected enough categories.
>> 
>> What is up with that???
>> 
>> I realize that this list doesn't have control over python.org, but there
>> are enough of you who are experts about all this stuff that maybe some
>> changes can be made.  If I ever learn enough, I hope to be part of the
>> solution myself.  A working search engine would be most helpful.
>> 
>> Yes, I use Google all that time. But quick search should be useful.
>> Thanks in advance for any insights and help.
>> 
>> 
>> Deb in WA, USA
>> 
> 
> It's known to be useless so don't bother, use a google site specific
> search instead.
> 
> Aside, your paragraphs are on one line, hope you're not using the
> dreaded google groups? :)
> 
> --
> My fellow Pythonistas, ask not what our language can do for you, ask
> what you can do for our language.
> 
> Mark Lawrence
> 

It shouldn't be useless.

No I'm NOT using goggle groups.  I'd be using a news reader if accessing
news was still free.  I'm just using an on-line email provider with text only,
and a subscription to the group.  I was not aware that Python Tutor was
even available in Google groups...

Hey, what you can do for your language is help make the search useful.  

Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Why is Quick Search at docs.Python.org so useless?

2014-07-05 Thread Deb Wyatt


> -Original Message-
> From: d...@hashcollision.org
> Sent: Sat, 5 Jul 2014 14:26:36 -0700
> To: codemon...@inbox.com
> Subject: Re: [Tutor] Why is Quick Search at docs.Python.org so useless?
> 
>> I realize that this list doesn't have control over python.org, but there
> are enough of you who are experts about all this stuff that maybe some
> changes can be made.  If I ever learn enough, I hope to be part of the
> solution myself.  A working search engine would be most helpful.
> 
> Hi Deb,
> 
> Yeah, unfortunately I don't think anyone here is part of the group that
> manages the web site.  You might want to contact them directly?  I think
> you should be able to reach them at:
> 
> https://www.python.org/dev/pydotorg/
> 
> It would be good if the web page search engine were to be improved.
> Let's
> get the feedback to the right people so that it can be fixed.

Thank you for the link.  That is very helpful.
Deb in WA, USA


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] How does this work (iterating over a function)?

2014-07-09 Thread Deb Wyatt

> 
> Greetings,
> 
> 
> I've been learning Python concepts for about 6 months now and was doing
> okay with most of these. However, I ran into a fairly simple program
> developed by Mark Pilgrim in his "Dive Into Python" text that puzzles me
> and am hoping some of you can explain how this works. He is creating the
> Fibonoci sequence by iterating over a function that has a generator in it
> (i.e. no return statement). The code is as follows:
> 
> 
> def fibonacci(max): #using a generator
> a, b = 0, 1
> while a < max:
> yield a
> a, b = b, a+b
> 
> 
> for n in fibonacci(1000):
> print n,
> --
> 
> 
> Thanks,
> Steve Tenbrink
> Los Alamos, NM

I am pretty new to Python myself, so I don't know all that much, but you can 
get a visualization of how the code works at the following website.  It is a 
highly useful tool.  just copy/paste and step through. 

http://www.pythontutor.com/visualize.html#mode=edit

Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


[Tutor] sometimes I feel like my head is going to explode

2014-07-10 Thread Deb Wyatt
The more I learn, the more I realize that there is so much more to learn, and 
the more difficult some of the stuff to learn seems to be.  I'm not sure that I 
would have set out on this journey to learn Python if I had known how massive 
the task was going to be. I AM enjoying it, but my gosh, when am I ever going 
to feel like I have a handle on this stuff?

That is all.  

Deb in WA, USA


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Deb Wyatt

 lurkers and the like http://lignos.org/py_antipatterns/
 
>> Links of the format https://docs.python.org/3/howto/doanddont.html are
>> always up to date, the one you give is by definition 3.1 specific and so
>> will never change until such time as it presumably disappears
>> completely.
>> 
> 
> What timing http://bugs.python.org/issue21956 :(
> 
> --
I see you all are trying to explode my head some more.  The first article noted 
is what exploded it yesterday lol.
Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-11 Thread Deb Wyatt


terns in Python Programming
> 
> Hi Deb and others,
> Most are for people coming from different languages like C/C++, Java and
> so
> on (I myself am coming from C++ world, and can speak both C++ and
> Python).
> Unless if you're working on specific things, don't worry about some of
> the
> concepts until later (e.g. if you're working on variables, you might want
> to
> note down recommendation on lists, like loops and testing if a list is
> empty).
> As for learning new things, start with small steps first. In my opinion,
> it
> is better to have objectives on what you wish to learn, and if you want
> to
> speak Python fluently, learn the concepts until you can speak it in your
> sleep (you know what I mean). Also I recommend writing some things you
> truly
> wish to learn in Python so the tutors can recommend things you might want
> to
> go over before you learn your dream concept.
> Just in case I'm repeating a question that was asked here (as I'm new
> here),
> is python your first ever programming language?
> BTW, as a side note, for those who'd like to practice their skills, I
> highly
> recommend Code Eval (www.codeeval.com).
> Cheers,
> Joseph

Thank you for answering.  I used to be a Clipper/dBase programmer years 
ago. I got sick, couldn't work, and technology passed me by.  I've 
always been kind of ticked off that my career was short circuited 
because of illness, so I decided to see if I could get a handle on OOP. 
The more I learn about Python, the more I loved it. 

So much has been invented since my dos programming days and it is 
overwhelming, but I'm having the time of my life learning all this 
stuff. My head explodes quite often :).
  
Deb in WA, USA


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt

>> So much has been invented since my dos programming days and it is
>> overwhelming,
> 
> Actually very little has been *invented* since your DOS days.
> Almost everything we do today was already around back then.
>
I knew someone was going to say that.  Maybe it's the jargon 
that has been invented? 

Some questions I have at the moment:

1.  What is functional programming?
2.  What is procedural programming?
3.  What are data patterns?
4.  What are regular expression?

I worked for a private company for a while where I was the only 
programmer, then I worked for the Commonwealth of Kentucky, 
and then University of Washington, where I created and 
maintained database applications. I never heard of any of those 
things prior to the past few months since I started dipping my 
toes back in (more like total immersion, jeeze).  So maybe all 
this stuff has been around but I sure never heard of it.  

Almost every time I post a question on here, I get my hand 
slapped by someone, and the favorite thing for you all to say to 
newbies is "read the tutorial."  The tutorial is over our heads 
in a lot of cases because of the jargon, at least at first.  And 
so many times things are explained with C++ as an example.  

My favorite useless thing I have run across on the internet is 
the answer to what does hashable mean?  From stack overflow:

"An object is hashable if it has a hash value which never changes 
during its lifetime (it needs a __hash__() method), and can be 
compared to other objects (it needs an __eq__() or __cmp__() 
method). Hashable objects which compare equal must have the same 
hash value."

what is a hash value?  What's a _hash_() method (or any of those 
other methods)?  

You all take this understanding for granted, but it's not common 
knowledge for the rest of the world. I bet if I talked knitting 
and fiber jargon you all wouldn't understand much of what I was 
talking about lol.

Sorry this is so long, but if this list is to be useful for people 
the information needs to be understandable by the lay person
and maybe you all don't realize how much you take for granted.

Deb in WA, USA


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt


Wow.  Just wow! Thank you for all that information.  That was really helpful.  
Thank you very much!!

> What language or languages did you program with?
CA Clipper was the main language I used in my former programming life (dBase 
compiler). A very simple, basic database manipulation language, but quite 
useful.
Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt

> -Original Message-
> From: alan.ga...@btinternet.com
> Sent: Sat, 12 Jul 2014 21:57:37 +0100
> To: tutor@python.org
> Subject: Re: [Tutor] Anti-Patterns in Python Programming
> 
> On 12/07/14 20:24, Deb Wyatt wrote:
> 
>> CA Clipper was the main language
> 
> If I recall correctly it was one of several variants on DBase?
> There were also Foxpro and others all sharing similar syntax.
> 
> I once got a free copy of DBase4 (back in the days when we
> paid for compilers!) but it is still in its shrink wrap - I
> suspect its on 3inch floppies which I can no longer read!...

more likely 5.25 floppies lol.
> 
> If that's your background you might find the Dabo project
> interesting. Its built by some FoxPro guys who wanted similar
> features using Python. It has a GUI builder and some nice
> tools to build databases and forms.
>
Thanks for that info, I will take a look.  So much fun stuff to play with...

Deb in WA, USA


FREE 3D EARTH SCREENSAVER - Watch the Earth right on your desktop!
Check it out at http://www.inbox.com/earth


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Anti-Patterns in Python Programming

2014-07-12 Thread Deb Wyatt

> -Original Message-
> From: alan.ga...@btinternet.com
> Sent: Sat, 12 Jul 2014 19:21:59 +0100
> To: tutor@python.org
> Subject: Re: [Tutor] Anti-Patterns in Python Programming
> 
> On 12/07/14 17:43, Deb Wyatt wrote:
>> 
>>>> So much has been invented since my dos programming days and it is
>>>> overwhelming,
>>> 
>>> Actually very little has been *invented* since your DOS days.
>>> Almost everything we do today was already around back then.
>>> 
>> I knew someone was going to say that.
> 
> :-)
> 
> 
>> Maybe it's the jargon that has been invented?
> 
> In some cases yes, but mostly it was there all
> along just hideen in obscurity. For example all the GUI stuff we take
> for granted really came together at Xerox Park in the 1970's but didn't
> become well known till Steve Jobs paid a visit and promptly built the
> Apple Mac (after initially flopping with the Lisa!) around 1984.
> 
>> Some questions I have at the moment:
>> 
>> 1.  What is functional programming?
>> 2.  What is procedural programming?
>> 3.  What are data patterns?
>> 4.  What are regular expression?
> 
> As Mark has said I always go to Wikipedia for these kinds of answers.
> It is a great resource for all things technical. I'll try to give
> the newbies answers too though...
> 
>  > 1.  What is functional programming?
>  > 2.  What is procedural programming?
> 
> These are both programming paradigms.
> 
> Most programmers learn procedural programming first - also known as
> imperative programming. This is where you tell the computer how to solve
> the problem using the familiar sequences, conditionals and loops. You
> then package these constructs into procedures (or functions).
> You have data floating around loose and your procedures operate
> on that data changing its state(values) as it goes along.
> This means that in a procedural program two calls to the same
> function can return different results even if they have the
> same inputs:
> 
>  >>> state = True
>  >>> def f(n):
> ...   global state
> ...   state = not state
> ...   if state and (n % 2):  # n is odd
> ...  return n ** 2
> ...   else: return n
> ...
>  >>> f(3)
> 3
>  >>> f(3)
> 9
> 
> Functional programming is more like pure math. It is built on functions
> that return values and the values should not depend on external state.
> They always return the same result for the same input. Functional
> programming also attempts (with mixed results) to produce programs that
> look more like problem specifications than solution descriptions. So the
> functions often operate on data sets rather than individuial items
> (avoiding loops) and tend to use recursion a lot.
> ( I have a topic on FP in my tutor that explains more and uses
> Python to illustrate...)
> 
> There are also Object Oriented Programming and Logic Programming
> paradigms.
> 
>  > 3.  What are data patterns?
> 
> This is a bit more open ended since there are several possible answers
> depending on context. At one level it can refer to data modelling
> patterns that crop up again and again. For example instead of modelling
> assigned to each, model it as a person and a role. All the people go in
> Person, all the jobs in role. Then you assign one or more roles to each
> person. When a person gets promoted you don't have to move the data
> between tables you just change the relationships slightly. That is one
> common data pattern in the world of modelling. But it depends on the
> context where you came across the term
> 
>  > 4.  What are regular expression?
> 
> A form of text pattern. They are like wildcards for filenames but more
> powerful. They are used for finding substrings in text. I have another
> topic in my tutorial on regular expressions...
> Nowadays most languages support regular expression searches, including
> most SQL dialects on databases.
> 
>> You all take this understanding for granted, but it's not common
>> knowledge for the rest of the world.
> 
> I sympathise.
> One of the primary aims of my tutorial is to take a complete beginner to
> the point where they can understand these more technical tutorials. A
> lot of time has gone into explaining general computing terminology as
> well as showing how to use it. As far as possible every jargon term is
> explained when first introduced.
>
Thank you very much for your answers.  I'll start going through your tutorial.  
I can't wait to hear more about the book you mentioned you were working on a 
week or two ago.

Deb in WA, USA


FREE 3D MARINE AQUARIUM SCREENSAVER - Watch dolphins, sharks & orcas on your 
desktop!
Check it out at http://www.inbox.com/marineaquarium


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Read a file, Load a dictionary

2014-07-24 Thread Deb Wyatt
 assuming you're
>  using version 3.5
> 

How do you get version 3.5?  Python.org shows 3.41 as being the latest.

Deb in WA, USA


FREE ONLINE PHOTOSHARING - Share your photos online with your friends and 
family!
Visit http://www.inbox.com/photosharing to find out more!


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor



[Tutor] Real world use of recursion

2014-09-09 Thread Deb Wyatt
Sorry to bother you all with what you might consider trivia, but someone in my 
course forum posted this statement: 

"I have never seen or heard of real uses of recursion except for proving 
cleverness,"

so I thought I would ask you all if that is true.  Is it really not used in 
real world applications?

Thanks in advance,

Deb in WA, USA


Can't remember your password? Do you need a strong and secure password?
Use Password manager! It stores your passwords & protects your account.
Check it out at http://mysecurelogon.com/password-manager


___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor