What can you do with Python?

Suspended
Joined
24 Oct 2012
Posts
25,266
Location
Godalming
As title really, loads of people recommend Python as a starting language, but what could you theoretically code with it? My nephew's looking to code, just trying to get some inspiration for him really.
 
Associate
Joined
7 Nov 2013
Posts
255
Location
Kent, England
I am not a Python developer however I am fairly confident in saying anything you could do in another language is achievable in Python.

How old is your nephew and does he have any prominent hobbies/interests? Working in the domain of something you enjoy is the best way to get inspired/stay motivated.
 
Associate
Joined
30 Jan 2009
Posts
34
Code academy is an excellent tool for new or experienced programmers alike; https://www.codecademy.com/tracks/python

As far as which language to learn, it doesn't matter a huge amount when you start out, it's more important to get a "feel" for programming. Learning a new language isn't too difficult once you have experience with programming in general.
 
Associate
Joined
23 Mar 2006
Posts
1,739
As a Python developer my answer is: anything

If he wants to write iOS/Android apps then don't choose Python. Otherwise it's a great language.
 
Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
As title really, loads of people recommend Python as a starting language, but what could you theoretically code with it? My nephew's looking to code, just trying to get some inspiration for him really.

How old is he? Might be better to start him programming with Scratch, then move to Python. There's free resources for it and I've recently spotted a Scratch - make a game magazine in Sainsbury's

As a Python developer my answer is: anything

If he wants to write iOS/Android apps then don't choose Python. Otherwise it's a great language.

You can write android and IOS apps in Python using packages such as Kivy.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
Python is Turing complete so anything that is computable, see Gödel's incompleteness theorems, turing halting problem and Church's unsolvable Number theory for some limitions.



In practical terms, python is a great scripting language and a nice alternative to bash for getting things done quickly and legibly. But don't put it in anything production related, simple things like upgrading the OS can kill python projects since the versions are so incompatible.
 
Soldato
Joined
22 Dec 2008
Posts
10,370
Location
England
Python's integration with C is pretty tedious (excepting the cython project, which is roughly python), but that's unlikely to upset a beginner too much. If your nephew has any interest in maths or the sciences, solving problems with code instead of paper and a calculator is pretty good. If he's more interested in visual stuff, I'd suggest writing a game.

But don't put it in anything production related, simple things like upgrading the OS can kill python projects since the versions are so incompatible.

Struggling to parse this. What's the relationship between the OS and the Python version? A depressing amount of code still requires 2.7, since no-one is willing to spend the time porting it to 3.x, but that doesn't correlate with the operating system.

On the other hand, python's approach to typing and runtime performance might kill enterprise-style production code.
 
Caporegime
Joined
18 Oct 2002
Posts
32,623
Well, ajy not always be upgrading OS but installing on different OSes for sure. We have had python script that work fine on some of our systems but then completely fail on other because depending on what OS you are using you will either get Python 2.6, 2.7 or 3.2+


the performance of course is another reason, the latency itself would make it useless for our products and we would have to spend thousands and thousand per month on additional CPU costs.
 
Soldato
Joined
6 Mar 2008
Posts
10,079
Location
Stoke area
Well, ajy not always be upgrading OS but installing on different OSes for sure. We have had python script that work fine on some of our systems but then completely fail on other because depending on what OS you are using you will either get Python 2.6, 2.7 or 3.2+

Again, it's a case of simply using the correct version, however if the program is converted to an .exe for windows it should carry it's own version and have no issues.

the performance of course is another reason, the latency itself would make it useless for our products and we would have to spend thousands and thousand per month on additional CPU costs.

What are your products?
 
Last edited:
Suspended
OP
Joined
24 Oct 2012
Posts
25,266
Location
Godalming
Thanks for the input all!

He's 11, reminds me a lot of when I was a kid except that in my days it was MS DOS and Qbasic. I remember going over to TurboPascal7 and was amazed!

He loves computers and is always messing about with projects. I bought him a Pi last year and he's made a media server out of it, really clever little man.
 
Associate
Joined
7 Aug 2012
Posts
948
If he's got the Pi then I would have thought Python would be the programming language of choice.

However, if he also likes tinkering with PC's than maybe something like Visual Basic .Net maybe worth looking at. Could be useful for him to have a play about with the Forms and drawing buttons etc...
 
Associate
Joined
4 Mar 2013
Posts
126
Location
Cambridge, UK
Just to throw my 2 cents in here... (as a Python developer)

Used with Qt and some Python libraries (such as PyQt) you can build entire cross-platform desktop applications.

Its used a scripting language for Autodesk tools (3DS Max and Maya), you can make plugins for these.

Its great a general-purpose scripting language, with very powerful libraries. I've written scripts to dynamically generate images based on data input. Usable on the Pi quite easily too.

Its great for learning the basics of programming in an easy-to-understand way. That said, I'd always advise branching out once you've got one language under your belt - JavaScript and C# are pretty standard these days.

As a final aside, its on the new GCSE's computing courses as standard, so its worth picking up as it'll come useful at that stage (assuming he's not at GCSE-age yet).
 
Back
Top Bottom