For the third acitvity sheet we were given the certain theoretical and practical tests to do, and the topic was Variables and Data Types.
The first question was: Why are numbers with a decimal point called “floating point” numbers?
First of all, I had from before some knowledge to what happens when you do certain calculations on a computer. Im not going into the deep explanations on my blog here, but basically what it means is that a floating point number is – well floating. You can never be sure what the result will be after a calculation with decimal numbers, because on computers we use a binary system to calculate instead of base 10. As an example, if you divide 10 by 3, you will get a never ending number right? It is kind of the same thing. In discussion with the teacher about how to easily explain this in the future – we ended up with the phrase “Floating point numbers are the rebels in programming”. Therefore, as an example never use a floating number to stop a loop in your program!
The rest of the theory part were generally about converting binary into decimals, and then converting binary into decimals that again where to convert into ASCII. All of this was good fun, but nothing new in my world. At the very least it gave me a sense of accomplishement 🙂
So, over to the practical part. This was a series of different tasks to try out various codes, and you can see my results in the screenshots below. I didnt really have any difficulties in these tasks, although it was practical to go through them.