Posts

Showing posts from November, 2023

What is an algorithm?

Image
 An algorithm is a set of instructions used to solve a problem. It is important that the instructions or steps are written in a logical order e.g. it is impossible to get to a mall before waking up! Pseudocode is one way in which an algorithm may be written.  Pseudocode is steps in an algorithm written in plain language for ease of understanding. An example of pseudocode to add two numbers and display the sum of the two numbers is as follows: Start Declare variables num1, num2 and sum Assign values to num1 and num2  Add variables num1 and num2 and store the result in the variable sum Display the sum to the console End To truly grasp the concept of pseudocode the following video can be watched: https://youtu.be/preyTbKXDoQ?si=wVFovw6UPRSouE-y Another way in which an algorithm can be presented is in the form of a flow chart. A flow chart is a diagrammatic representation of an algorithm that consists of shapes joined using symbols to show the logic of the algorithm. The foll...

How to Program Calculations? An introduction To Arithmetic Expressions

Image
  What are arithmetic expressions? Arithmetic Expressions are expressions used to solve problems such as calculating an employee's salary or programming an accounting software used to manage the day-to-day financial flow of a business. A simple arithmetic expression could be the sum of two numbers e.g. 3+4, or can be used in an equation to calculate an employee's salary e.g. net salary = 50000-1000. In order to tell a computer how to process data when writing programs, operators are used in arithmetic expressions. Understanding the use of arithmetic expressions is crucial as they are used in the majority of computer programs. The following table contains operators used to perform arithmetic operations, and their order of precedence: Pretorius, CM and Erasmus HG. (2012)  Basic Programming Principles . 2. Cape Town: Juanita Pratt. References Pretorius, CM and Erasmus HG. (2012)  Basic Programming Principles . 2. Cape Town: Juanita Pratt. Background image by freepik: Image b...

The Benefits of Exercise To Mental Health, The Body And The Brain

Image
https://youtu.be/BHY0FxzoKZE?si=p5Efxbm_MzFwxOhd  "Exercise is the most transformative thing that you can do to your brain today-" Wendy Suzuki enthusiastically stated. This statement intrigued me as I used to think that, before watching her presentation on TED, our brain was, well, unable to be physically trained. According to Wendy Suzuki, a neuroscience professor and researcher, it was observed in her lab that a workout or any form of physical activity improved the protection of the brain. She went on to research and discover more benefits of exercise to the brain by using her own brain as an experiment in her lab. These benefits included: Improved memory due to brand new brain cells being produced in the hippocampus(a key structure located in the temporal lobe of the brain)which increases in volume as a result of exercise. Improved mental health due to the release of neurotransmitters such as dopamine-giving a pleasurable and happy feeling, and adrenaline-induced motivati...