The Python Walkthrough Thread

Updated the OP. Hope to see some current members return since the majority of people are on Phase Two, Four (and beyond) might have to start without them if they don't come back. New folk are still welcome to sign up, reply to register your interest.

I am currently on holiday for the week, so next tutorials will be a couple weeks away at least.
 
Last edited:
Phase One: Figure out who wants to take part! Reply to register your interest.
Phase Two (Post #21): Get people set up with the relevant software. Make sure everyone is set up before going onto next phase.
Phase Three: Teach basic syntax of python using simple examples, while explaining each example

So your working on Phase Three I guess? And your forward to Four?

Edit: keep me informed of your progress! Also for others reading this, I am interested in seeing some people complete phase three, put in a reply to let me know you have started on it :)

Yes:)

Have not had the chance to finish phase 3 yet.

Happy to play catch up.
 
Phase 3 complete although I don't really understand the classes.

Some times its hard to understand something until you see it in practice. I've learnt the basics of several languages and some concepts are a little hard to grasp until you've used them.

Don't worry too much about it for now, it'll become clear when you are using them :)
 
Some times its hard to understand something until you see it in practice. I've learnt the basics of several languages and some concepts are a little hard to grasp until you've used them.

Don't worry too much about it for now, it'll become clear when you are using them :)

I found everything in phase 3 easy to understand, its just the classes went straight over my head. I will do some more reading over the next couple of days to see if I can get my head round it.
 
Completed Phase 3

I found everything in phase 3 easy to understand, its just the classes went straight over my head. I will do some more reading over the next couple of days to see if I can get my head round it.

One of the best explanations of a class that I've ever seen is to think of them as 'things' in the real world.

An example of a 'thing' could be a person, which has attributes (variables) such as age, weight, height etc. but also actions (methods) such as eat food, go to work etc.

Another example of a 'thing' could be a car, with attributes of make, model, colour, top speed and actions of accelerate, brake etc.

It's basically, as Rich said, a container for a number of related bits which an easily be referenced later on in your code. So every 'person' in your code would have the variables and methods above, and the same with each 'car'.

I hope that helps and doesn't confuse you more :D
 
Is it too late to join in? I'm trying to work my way through various books for programming and this looks a nice gentle way in.

edit : I'm trying to roll in ObjC as well as I have an iOS app idea I want to do but no friggin idea on coding - I have very basic VB skills and the last programming I did was assembler on ZX81 :o
 
Last edited:
Hey all, I'm a bit late to this but hope I can still join :)

I've done all three phases, I'm a bit stuck on the classes though. Getting an error message:

datacls = mycls("hello world")
TypeError: this constructor takes no arguments

Not sure what I've done! I kind of understand the theory of classes but they always confuse me when I start using them.
 
I've done all three phases, I'm a bit stuck on the classes though. Getting an error message:

datacls = mycls("hello world")
TypeError: this constructor takes no arguments

Not sure what I've done! I kind of understand the theory of classes but they always confuse me when I start using them.

It's saying that you don't have a constructor (I.e., the method which is executed when the class is initialised where you can do various set-up bits) for your mycls class which accepts parameters (the "hello world" bit).

As standard classes don't take arguments, you have to add your own method to extend it in this way.

Which makes me wonder, have you got this line in your class definition?

Code:
def __init__(self, data):

and are you using double underscores rather than just one?

Without it, your mycls object will just be using its standard constructor which is why it's breaking.


(the above is true for C# anyway :p)
 
Back
Top Bottom