Head to the main page to check out our other popular resources: Challenges | Solve and Learn | How-to
Sign up for free and purchase a subscription to access any paid downloads available (£50.00), including power points and task files.
Sign up - Free to download the powerpoint and associated files.
Memory is a curious thing. It isn't fully understood. Just stop and think for a moment - your brain is essentially a lump of flesh. How does a lump of flesh REMEMBER? If I told you now (as you read off the screen) that I am 33 years old, you would REMEMBER the number 33 or rather your brain - that lump of flesh - somehow stores the value. How old am I? That's right - your lump of flesh remembered!
Remember a computer is just a bunch of circuits. Circuits that can be turned ON and OFF. That’s where the genius of Binary comes in, but you’ll have to navigate to www.teachingcomputing.com for that topic. Programming langauges aren’t quite dealing with memory at a low level, but all you really need to know is that they use things called Variables to store values and data. A variable as the name suggests, is changeable so can be altered while the program is running. In Python, declaring a variable is super easy. Decide what you want to store, decide what you want to call your variable, and then give it a starting value!
The data stored in memory can be of many types. Remembering my age -33 – is a numeric value. You may also want to remember your grandmother’s address, and that would be stored as alphanumeric characters. Python has various standard data types that are used to define the operations possible on them and the storage method for each of them. For now, just keep the following in mind: Numbers, Strings, List, Tuple, Dictionary. It won’t be long before you know what each of these things are and are using them like a pro!
Just to demonstrate, here’s an example of using the python IDLE to create a couple of variables, change their values, and then finally print the value of of z, which is the sum of the first two variables. Nothing terribly complicated yet, but it’s a start. Without variables and values that are stored in a program, you wouldn’t get very far. So, if you haven’t already, make sure you have downloaded Python 3, and try it yourself in the IDLE.
>>> x=2 >>> x=4 >>> x=3 >>> y=5 >>> z=x+y >>> print(z) 8 >>>
Declaring string variables in Python and doing something cool - Concatenation!
>>> name="mr" >>> lastname="moose" >>> wholename=name+lastname >>> print(wholename) mrmoose >>>
***Did you know that studying the brain has led to several revolutionary advancements in computational theory? The brain is a wonderful organ …wait, that really is an understatement. The brain is unsurpassed in what it does. Have scientists come close to creating a robot that has a brain like ours? Gosh, not even close. As in….not AT ALL close. So, the question is – is the brain a mere machine? Philosophers through the ages have asked themselves this very question and you may want to check out John Von Neumann’s “The Comptuer and the Brain(1958). Read the stuff he wrote about here! Is the brain a machine like a computer? Now, don’t take his word for it. You’ve got to come to your own conclusions about things like this! Even if the brain was like a machine – what does that say about life and evolution? Is it really possible that the brain evolved by random chance? Perhaps, you might say, especially if one had billions of years to play with …but the billions of years may actually create more of a problem in terms of the evolution of such an incredibly complex organ. Would you believe it if someone told you a fully functional computer had been found in a cave in Africa and it had almost certainly evolved, without any intelligent design or ‘designer’ behind it, all on its own? What do you think?
Your one stop for all things Python. Do look around!