Python

Photo credit: xckd.com/353 Preface material Who is this for? It’s for a beginning programmer, but I’m assuming this isn’t your first programming language — HTML doesn’t count, but if you coded a bit of JavaScript, then that counts. The very fundamentals of coding won’t be tackled in here. I’m already assuming that your quite familiar with some of the tenets of imperative programming, like, statements are arranged in sequence, they execute one after another unless redirected by a branching construct like an if, or a looping construct like a do; or variables can hold data, they have a memory address and we can replace that data whenever we like — stuff like that.
Read more...

Python Exercises

Photo credit xckd.com/189 Exer 1. Ask the user for input, then greet the user. Store the user’s response in a variable and print it out. Exer 2. Ask the user the year he was born, then print out his age. Exer 3. Print a triangle of asterisk, see the output below * ** *** **** ***** ****** ******* ******** ********* There are 10 asterisk on the last line of the printed output
Read more...