Level-2
14 / 9 / 2023
TASK-1 : JAVASCRIPT
OBJECTIVE:
To learn the basics of javascript and create a small webpage which takes the names and marks of ten students and calculates the
- Percentage of each student
- Class average
- Rankings of the students
Source code- https://github.com/Skanda-gowda/Level2/blob/main/index.html
TASK-2 : Async JS
OBJECTIVE:
To learn about asynchronous javascript and implement a small callback based program that displays the steps of a food recipe (consisting of at least 10 steps).
LEARNINGS:
Asynchronous JavaScript- is like a traffic cop for your computer programs. Instead of making your program wait for a task to finish, like waiting in a long line at a store, it lets your program keep doing other things while it waits for the task to complete. This helps your programs run smoothly and stay responsive.
Callback function- is a function that you pass as an argument to another function. This callback function is then executed when the operation that the original function started is completed.
What I did:
I made a Burgirrr recipe website which displays steps to make a veg or non-veg burgirrr recipe based on user input for veg or non-veg.
Source code: https://github.com/Skanda-gowda/Level2/blob/main/async.html
TASK-3 : Promises
OBJECTIVE:
To implement the above recipe program with promises and list the potential benefits and improvements of using the same.
LEARNINGS:
Promises are used to handle asynchronous code in a more structured and readable way compared to traditional callback functions.
Inside promises we write conditions for resolve and reject. If promise is resolved we use .then( )" and write resolved code inside that else it is rejected and write code after rejection inside ".catch( )".
Source code: https://github.com/Skanda-gowda/Level2/blob/main/promises.html
Task 4 - Get familiar with the command line and do the following subtasks:
OBJECTIVE:
-To create a folder named test.
-cd into that folder.
-Create a blank file without any using any text editor.
-list the files in that folder
-create 2600 folders in this folder where each folder is named like . For example, M90 or B56.
Following are the commands I have used to perform this task:
Initially as I am using Ubuntu on windows I used the following command to navigate through C drive on windows
- cd /mnt/C/
- mkdir skanda
- To create a folder named Skanda in C drive
- cd skanda
- To change directory to skanda
- echo >skanda
- To create a file named skanda
- echo >nithin
- To create a file named nithin
- echo 'Skanda and Nithin' > nithin
- To write content nithin file
- echo 'are best friends' > skanda
- To write content in skanda file
- cat nithin skanda
- To concatenate two files and to display output on screen
- mkdir m90{1..2600}
- To create 2600 folders at a time
- ls
- To list all the files and directories
Task 5 - VI
OBJECTIVE:
To learn the basics of vi and create a markdown file in vi illustrating the various features of vi that I found to be fascinating.
LEARNINGS:
VI is a text editor available on most Unix-like operating systems, including Linux. It include two modes command mode and insert mode.
-Command mode is the default mode when you open a file in vi. It's used for navigating the document, issuing commands, and making structural changes to the text.
-Insert mode is used for actually typing and editing the text within the document. To enter Insert Mode, we have to press i (for insert) or a (for append) in command Mode.
What I did:
-Created a file named "markdown" using touch
-To edit or write in that file I used vi
command
-Now by default it will be in Command mode to go to insert mode I wrote i
-Now I wrote the some features of vi
-I entered :wq
to save that file
-Now i can see the contents of file by using cat
Task 6 - Linux Continued
OBJECTIVE:
To learn the basics of regex and piping in Linux. Using the knowledge gained from the above two topics, learn how grep works. Use grep to extract login times within a date/time range from the login logs using the 'last' command. Pipe this information into a text file and put it into a folder named logs. Zip this folder using gzip and tar.
LEARNINGS:
-Regex: Regular expressions are a powerful tool for searching, matching, and manipulating text. They are used in various programming languages and command-line utilities to perform operations on text data.
-Piping: Piping in Linux allows you to take the output of one command and use it as the input for another command. The pipe symbol " | " is used for this purpose.
-grep: grep is a powerful command-line tool in Linux which is used for searching text or regular expressions in files or input streams.
Task 7 - Introduction to Cloud Computing
Cloud computing is a technology and service delivery model that allows users to access and use computing resources (such as servers, storage, databases, networking, software, and more) over the internet, often referred to as "the cloud".
Task 8 - Introduction to Cybersecurity
OBJECTIVE:
To Convert & document the following text into Caesar cipher, Pigpen cipher, Morse code, Rail fence cipher, Polybius cipher & Playfair cipher:
Cybersecurity in Marvel
-Caesar Cipher: F b e h u v x f z r o l y l q P d u h o h
-Pigpen Cipher :
█ ▄ ▀ ▄ ▄ █ ▄ ▄ ▀ ▄ ▄ █ █ █ █ █ █ █ █ █ ▄ █ ▀ ▀ ▄ █ ▀ █ ▀ ▀ ▀ █
-Morse Code: -.-. -.-- -... . .-. ... . -.-. - ..- .-. .. - -.-- / .. -. / -- .- .-. ...- . .- . .- . .- . .- .- .- .-.
-Rail Fence Cipher: Cbri nMaecesylruyv
-Polybius Cipher: 33 24 22 15 53 34 24 13 34 51 42 53 44 25 15 53 12
-Playfair Cipher: UK VV HN RY ZS KS VS KT X
"