Coming to class on Monday been the first working day of the week with the eagerness to learn, putting in more effort knowing fully well of how I failed last week's eviction test 🤦🏾♂️, and I've promised my self to do better.
With the help of my instructor Mr. Dimka, we started the class discussing a topic he captioned and wrote on the board "Modes in Vim" where he listed and explained the mode in vim, which are:
- Normal mode
- Insert mode : we use (a, o, s or 'insert') on the keyboard to navigate to Insert mode
- Command mode / Command line mode
- Visual mode.
There are inbuilt functions in vim, that makes it easier to use
- Y : yank/copy.
- P: put/ paste
- G : go to end of line
Moving on....
Mr. Dimka my instructor said: one of the reasons 'vim' was invented was for I as a user not to frequently use my mouse.
He went further to explain in detail the following:
All file opened in vim are called 'Buffers'.
While still in vim , use "edit" to open a new file, "split " to view/open two or more files on a screen , "vsplit" to vertical split your screen, "ctrl ww" to switch between two or more opened files.
To sort alphabets alphabetical use "sort ui" and to undo that task use "u"
To move up or down line use "K, J " respectively.
To move to the right or left, use "L, H" respectively
To move to the next or previous buffer use "bn, bp" respectively.
"DD" is used to delete a complete line, "X" is used to delete a single character/alphabet, "DW" is used to delete complete word(s), "QA" is used to start recording on vim while "Q" is used to terminate/end recording.
The instructor made us understood and explained practically on how to use the above mentioned functions.
During the week we were introduced to Python as a programming language, I learned and got to know that python is an interpreted language, which means that, it reads/executes line by line of codes unlike other complied languages.
In Python, there are two primary working modes:
1. Interactive Mode: This mode allows you to execute Python code line by line, and you can see the results immediately. You can access interactive mode by opening a terminal or command prompt and typing `python` (or `python3` depending on your system).
2. Script Mode: This mode involves writing Python code in a file with a `.py` extension and running it using the Python interpreter. You can write a Python script in a text editor or IDE, save it with a `.py` extension, and then run it using `python filename.py` in the terminal or command prompt.
Both modes have their own advantages and use cases. Interactive mode is great for testing small code snippets or exploring Python's features, while script mode is better suited for larger projects and applications.
"Python is beginner friendly" the moment I heard this, my mind was at ease for a while 😁.
Python is also a high level language.
We all got to know "The Zen of Python" where I learnt that python takes-in/accepts only valid commands.
Furthermore, I learnt some of the Data types and their representation in python which are:
1. Strings (str) : are combination of alphanumeric characters
2. Intergers (int) : these are combination of both positive and negative numbers.
3. Float (float): are used for numbers in decimals e.g. 0.1, 3.0
4. Dictionary (dic).
In conclusion I learned that Reserved key words in python are words that cannot be used to name a variable in python. e.g. import, input, print.
#Blockfuselabs #Web2cohortIII # SofwareEngineeringJourney