--- # #LSEABL: Marathon (Week 4) >[name=dabaq0x] >[time=Fri, Jul 4, 2025 5:55 PM] The week started off with a wake up call from the CEO as he emphasised the importance of the weekly updates and being on time for classes. He also anoounced that the week would be run in marathon mode in order to keep us on our toes. This means that we would have classes everyday. ## Day 1: VIM: Navigation First off, we started by running through different editors in existence at the moment. Some of them include; Notepad, VSCode, Sublime, Nano, Emacs, Vi & VIM which is basically an improved version of Vi. Then we proceeded to cover the different modes in VIM. :::success VIM Modes: 1. Normal mode 2. Insert Mode 3. Command Mode 4. Command Line Mode ::: Insert mode has several keys assigned to prompt it. They include, the "i", "o", "a", "s" and "insert" key. We were tasked to write a bash script that prompts the user to input their name and display it. :::success Some important commands include; 1. x - to delete 2. dd - to delete an entire line 3. dw - to delete a word 4. y - to yank or copy 5. p - to put or paste ::: ## Day 2: VIM: Macro We were taught that in order to run a command on the vim interface that isn't part of its inbuilt commands, you have to precede it with a "!". There's a method for making changes to a files content called Macro. Macro is basically a feature that allows you to record a sequence of commands or keystrokes then you use the recorded sequence to perform a given task. :::success Some macro commands include; 1. qa - to enter recording mode 2. r - to replace a character 3. f - to find a character 4. q - to exit recording mode 5. gUl - to capitalise a highlighted character ::: We were also taught that files on VIM are called buffers. Buffers are created on the RAM (aka working memory) while anything permanently stored on the computer are on the ROM. When you create a file it exists on the RAM until when you wish to save it, then its stored on the ROM. ## Day 3: Welcome to Python Today, we were introduced to the Python programming language. Python is relatively easy to learn if you're already familiar with bash scripting. As it turns out, Python was designed to be the most learner friendly programming language, little wonder thats the one we've been started on; considering that we have already been taken through bash scripting in the previous weeks. Python is a high level language. In high level languages the computer makes programming easier for you while in low level languages, the programmer is required to specify every input. python can and has been applied to several things such as, Robotics, AI, web and app development. :::info Python modes: 1. Interactive mode 2. Script mode ::: To enter interactive mode, use "python3". Interactive mode doesn't allow you to save your input or activity on it. To exit interactive mode, use "Ctrl + d" keys. interactive mode can be used to perform simple functions like simple arithmetic. :::info for addition; > first_number = 7 > second_number = 2 > sum = first_number + second_number > sum > 9 ::: :::info for subtraction; > first_number = 7 > second_number = 2 > sub = first_number - second_number > sub > 5 ::: :::info for multiplication; > first_number = 7 > second_number = 2 > mul = first_number * second_number > mul > 14 ::: Statistically typed languages require you to specify the type of variable you're inputting while dynamically typed languages don't... python is a dynamically typed language. Variables are memory locations that store values. ## Day 4: Formatting We were taught that there are different valid formats to specify variables. and every other format is invalid. :::success valid formats; 1. Snake case - words separated by underscores eg. first_number 2. Pascal case first letter of every word capitalised eg. FirstNumber 3. Camel case - first letter of the first word in lower case, while the rest have their first letyers in uppercase eg. firstNumber ::: To declare a variable, it needs to have three parts; The variable name, the assignment operator and the value. :::success eg; firstName = Tim where; "firstName" is the variable "=" is the assignment operator and, "Tim" is the value ::: Variables can store data of different types, and different types can do different things. we covered some of those data types. ::: success Data types in python: 1. str - string: Sequences of characters enclosed in single or double quotes e.g. "Hi", 'Cobra' 2. int - integer: Whole numbers, positive or negative, without a decimal point e.g. 1, -15 3. float - Floating point numbers: Real numbers with a decimal point e.g. 4.19, -0.7 4. list - Ordered, mutable collections of items, enclosed in square brackets e.g. [7, "Cobra", 4.19] 5. bool - Booleans: Represents truth values, either True or False 6. dict - Dictionaries: Unordered collections of data in key-value pairs, enclosed in curly braces e.g. {"name": Amaka", "age": 10} ::: We were also taught the Zen of Python which promotes having an orderly and clean code that is easy to read, understand and execute. ## Day 5: The Twist Test After spending the week consuming information and running tasks on the knowledge gained, Friday came with a test. But here's the twist, we were asked to shut out laptops and run the test on a piece of paper. We were given four tasks to write out the code on the paper. This exercise exposed our dependence on the computer to expose our minor errors while writing code We were urged to learn the commands and how they work rather than cram them and rely on the computer to sort our errors. ## Conclusion Inasmuch as we have made progress on learning and practice led internalisation of programming commands and concepts, there's still room for improvenent. And for that reason, we have been recommended a practice course online and urged to take it for self evaluation. The journey continues.