Linux shell scripting enables controlled command execution through control statements including conditional statements (if, if-else, if-elif-else, case), loops (for, while, until), and flow control (break, continue), allowing scripts to execute commands based on conditions, repeat operations, and respond to user input or command-line arguments.
Deep Dive
Prerequisite Knowledge
- No data available.
Where to go next
- No data available.
Deep Dive
Linux Shell- Live Coding Session- Week-5
Added:Hello. Good evening everyone.
Okay, let me share my screen.
Am I audible? Can anyone confirm?
Okay. Okay. Thanks.
Okay. Fine.
Okay. So, uh this is week five live coding session. Uh I hope you are preparing for the quiz one. But uh still we have content released for the beak.
uh that five and six as well in this uh Friday. So uh we are continuing this session for the our weekly content and this is the coding session mainly and week five we have started the concept of cell scripting. Okay. So that uh we will understand the basics of the cell scripting language uh and we will understand that how we can use the cell scripting to write more uh controlled actually uh sequence of codes.
Okay. So, till now we have seen that uh how we are just executing the commands in the sequence. So, we are just writing the commands in sequence in cellcript file and we are executing the that uh that cellcript file and all the commands are executing in the sequence given sequence. Now uh how we can control our flow of the execution of commands or anything. So that actually uh we will uh discuss in week five content six and week seven I think also. So all are cell script basis and uh here we will see like basics about the uh cell script and also the control statement in the uh cell scripting. So like the other programming language how we can control the flow of uh our execution. Okay. So same things uh here also we can control our flow. So like suppose if example if you want to execute a one specific command and many number of times like 100 times. So how you will do this? So for that type of uh like uh things you required in loop. Okay. So like other programming languages and similarly if you required the command for some specific condition based if that condition is satisfied then only that command should be execute. So you required a conditional statement for that. Sometimes you required a loop with uh that uh that will stop at any particular event occur. So this type mainly the like other programming language we have the control statements here also we have the control statements that actually u like handle the control of execution flow. Okay. So we will just practice on that uh how we can write the loops how we can write the conditional statements in our cell scripting. Okay.
So all the how we can take the input from user, how we can take the input from command line command argument and how we can use those input in the we can store that uh input in the variables and then we can use later. So that uh like this is very similar to the other programming language. You have already done C programming and uh you know that what is the main idea of this control and this cell scripting is also very very related to the like C programming syntax. You will see we will use most of them type of syntax some is some part is changed and we will see how we can use so we will solve basic programming problems but we will use this cell scripting here. Okay.
So now uh the basic idea of cell scripting I'm giving you uh like what is the basic uh syntax we used. So this is like we are what we are doing. So cell scripting is a text file containing a sequence of Linux command that are executed one after another. Okay. But that is not only the enough we require the more control. So here uh we will see some examples. So this uh this we always write this cang first and then we'll write the sequence of command and run the script without cing like we can just run the script uh through this b and script.shs file or if you have mentioned this cing then you can also just change the permission and write this uh /c script. SS to run this script file.
Okay. SH file. Now what is the structure like basically of the uh this script file always first line we uh write as a like uh this cbank part. Okay. And this is the uh this is the hash is included as a com command in scripting. This h is represented as single line commands. So uh we just write the cbang first then we can mention command. This is optional.
After that we just write the variable declaration. Then we command some decision making, conditional statement, loops, function, all these are basic idea of the programming uh context.
Now comments first see the basic like comments. What is command? So comments are just like a lines and a statement which is provide some information about the code that is not executed that is that are ignored actually. Okay. So single line comment you can write like this using the has and multi-line comment you can use this colon and then single quote and in between you can write the multiple line uh comments uh to print the output you use the eco command so eco and then uh write the like thing what whatever you want to print you can write in this form so that will be print in the output and like uh multiple value so here you can see how we can assign a variable so This is the example for variables. So we have just taken a name of variable and equal and then value. Okay. So that value and there is no space should be there with this equal signs uh on any side and that we are assigning like a variable and we can use this variable with the sign of this dollar and that will be like pass the value in this string. Okay. So welcome instead of this dollar name will be replaced by the value of this name variable and your output will be looks like this. So variable is just like a store value. So there's no need to declare the type of uh variable here.
Just uh write the name and then equal sign and then value of that variable.
Okay. So without any space. So like this is the example you can assign the value name equal to John and is equal to 25 cell equal to 25. So in this way you can assign the variables and you can store the value on those variable uh access variable you can simply use eco and like this dollar sign and then variable name.
Okay. So you will get the like value of that you can also like use in this structure. So like dollar sign and this curly braces and your variable name.
Okay. So that will also return the same things. Uh now ruling is uh variable naming rules are like uh always used like this. So do not start with number.
So like this is uh correct. All these are correct actually. So student uh that should either we start from letter or alphabets letter n or underscore. Okay.
And uh so this is invalid. You can see this is invalid. So you that should not be start with the uh numerical number.
Your variable name should not be start from the numerical number. and that should also not contain any space in between. Okay, so that is also incorrect. So this is very uh similar to the C programming language. Now reading user input. Okay, so how to read the user input? So here we have the command read. Okay, so read and just give the name of your variable. So this command will stop your execution and we'll wait for the input uh from the user and once you will pass the input that uh input will be stored in this variable name.
Okay. So that command is used to read uh like is in C program after that uh wait for this value and that value will be stored inside the name and then you can print that. Uh instead of this you can also write a oneline command. So that is read and less than uh dp. Okay. So here you can pass the message as well and the same command that will accept the value for your input. So enter is so that will display on the like terminal and then you can pass the values that will store into the edge. So this uh this is the option for read command multiple input you can also take so read and space and then your variable name by separated by the space. So in this way you can read multiple value in the one command. So this is just like a input how we can read the input from uh this cell scripting and command line argument is different. So at the time of running the script script file suppose you have written one script file script.sh and uh that you can pass the like some argument at the time of run the command.
Okay. So you are running this script file using bass. So bass and script. At the same time you can pass the value for this uh this uh script that is called as a command line argument. Okay. So we are passing the uh command argument in the same command when we are running. So this will be passed to the like this script and how we can access those in the script with the help of this dollar one dollar two and dollar three. So dollar one is indicating to the first argument dollar two second argument dollar three is the third argument.
Dollar zero is indicate the file name.
Okay. So that is the like how we can take the command line argument uh in the script. So this is just some like special variable. So dollar zero is the script name and dollar one first argument. Dollar two is the second argument. If you want to identify that how many number of argument you have passed. So that is dollar has. So that will return as a number of arguments and dollar at the rates all argument it will uh give you and this dollar dollar is a process id dollar uh question mark is a exist exit status. Okay. So that are some common variable uh we we can directly use in our script. We have other also. So but that are very common.
Now comes to the arithmetic operation.
So like arithmetic operation uh you can uh perform in this like this in this way. So you can see this type of uh expressions are written inside the double round bracket.
You will see later multiple type of brackets. Okay. Square bracket you will see single square bracket and double square bracket and then double round bracket. So we will see this separately.
So what is the different type of brackets and when we use different type of brackets. So this is the one arithmetic operation. So generally if you have any numerical expression always use this double round bracket and you can directly use the expression like is a C programming expression you can use all operators like greater than equal to plus everything you can use similar to your C expression. So this is the like idea of expression inside the double round bracket write your expression is normally with your variables. Okay. And when we are using this dollar sign okay so this dollar before this uh bracket so this means uh we will just return the value of this expression and we will assign into some variable. So if you just want to perform some expression without returning a value that you can simply write this okay if you want to return your calculated value uh into some another variable so that always use before this dollar sign. Okay so like here sum equal to then dollar. So this calculation a plus b that value will be returned to sum. Okay. So for return we use this dollar before this uh round bracket. So this is example like either we can directly print so that will be print the total sum or we can return this variable value into some variable and then print that. So exit status is just like a zero is always represent the success and non-zero is the failure of the commands. Okay. If any commands is fail. So like suppose if you're running this command mqdir test. Okay. And uh after that just run this command eco dollar uh this uh dollar and question mark. So this will just uh give the status of the previous command that was like uh successfully run or failed that status it will provide. So it will if it is providing zero that means previous command successfully run. If a previous command is failed for any reason this will show the error code other than zero. Okay. So this is the basic like uh now control statements we come. So we have the similar type of all control statement. We have conditional statement. We have switch case. We have loops, break, continue everything we have in this also. So if statement uh structure you can see uh so you know that what is the meaning of conditional statement. So if we have any specific condition accordingly we will just execute one of the part which satisfy the condition. So if the structure is looks like this. So you can see we are writing if this is a keyword. After that we will write a condition and then we will write it then. Okay. So this here we are not using parenthesis or that type of things. We are using then means if this condition is true then this statement should be executed. Okay. And this is the end of your if condition fi.
Okay. So opposite of this if that is fi.
So this is the structure of if condition. So if condition then statement and fi okay so like if you see this example here so read marks. Okay now we are just uh so this command will actually take some input from the user and that will store into the marks and now we are checking this condition marks is - g. Okay so here you can see we are using square bracket. So that is the like uh uh another way to check write the condition. Uh so here this GE means uh greater and equal. Okay. So this is equivalent to this sign. Okay. Greater or equal. So we are checking are the marks greater or equal to 40. So uh this is the meaning of this condition. And if this is true so this will be uh print it will pass otherwise not. Okay. So if else similarly structure we required the if this condition is true then this should happen otherwise this would be happen. So this is a structure if condition then this statement else this statement. Okay. And then fi. So just make sure that you are closing the block with this sign.
So here this is the like even or odd thing. So we are checking. So here we are writing round brackets. So we you can use direct all the operators. Okay.
Number uh this division by two and equal to equal to zero. So if this condition is true even otherwise odd. Okay. And we also required a chain of uh if else like this. So that will be written like this.
Okay. So if condition then statement.
Okay. Then l if then second condition then another statement. So in this way we can write a big chain multiple condition. And at the end we can write else and then fi. Okay. So that is the same uh type of structure we have and like this type of condition we can write if this first condition is true then this should be happening. L if this is the second condition is true then this should be happen. If this third condition is true this should be happen otherwise else fail. So this is a complete structure for if l if l if else. Okay nested if is the same uh structure like first condition we are writing then inside the second condition we are writing. Okay. So this is the second complete if block inside the outer if block.
So case statement switch case you have seen in the C programming. So here we write the expression like this. So case this the keyword and we write the expression here. So expression maybe variable or some multi like expression that will return a value and in okay so this in we will write and after that we will write pattern here. Okay. So whatever we are just getting from this expression if that output is matched with any pattern so that command will be execute. Okay. So pattern one and round bracket and then command and then double semicolon. Okay. So this is one part. So if express expression is written matched with pattern one so only this part will exclude. If it is matched with pattern two so only this second part will exclude. If it is not matching with anyone so default. Okay. So this is the default like anything so that will be excluded. Okay. And this is the like case. So this is the starting of block and this is the opposite of this. Okay, a sec and uh this is like example for this.
And now see the loop how we write the loop. So multiple way we can write the loop. So some looks like very similar to the Python, some it looks like very similar to the C. So here for I in and we will just write a set of values separated by space. Okay. So from that uh that set of value it will take one by one each value and will uh execute inside the loop. So for do and done.
Okay. So here this is the complete structure for loop and this I value will take one one value from one by one and will uh execute the body and we can write in this way also. So if you have like big range for the loop so you can simply write for i in cy braces 1 dot dot five. Okay. So this is the braces expansion. So this will provide the complete range 1 2 3 4 5 and we will just read each value for I and then we'll execute. The other is like C style. So you are familiar with C. So you can write your uh this loop with the C style also with the round double round bracket. Okay. After that you can simply write in this uh this uh command. So I = 1 col I is less than equal to 5 as the complete and do the same things. So uh whatever you are comfortable will always use that. So while loop is the same while then condition and do enter. Okay. So same like uh for loop we have do and done and here also we have do. So condition is true then only this part will be done otherwise it will execute.
Okay. And this just like one example of while loop. So also use the condition same round bracket. This is very common and I think that com comfortable you can use. And here you can see we are incrementing the value. So this operator is also you have seen in the C programming. So I ++ just a increment of the value. Enter. Uh there is one more command until. Okay. So here it is while. So while this condition is true then only you will exit. So until is until this condition will not be true then only this statement will be executed. Okay. So here we are checking and uh for this example until I is greater than five. So until this condition is not become true then we will uh run this command. Once this will become true we will stop. Okay. So this is just the opposite of while in while condition we are checking if this while this condition is true then we will execute. If this condition is not true then we will stop. Here if this condition is like not true we are executing. If this condition become true we will stop. So this is the until.
Okay. So this is the idea like while and do break and uh continue is the same way in the C programming. So we have break statement. If you want to stop our iteration at any point by any condition, we can just write the break uh that statement that will break the loop closure loop which is like uh uh which is uh inside which this break statement is actually executing.
So that closure loop will be terminated at that point. Okay. And continue is just like a uh we want to skip the remaining uh part of the code. Okay. So here you if you see this this code so this continue statement if this is executed so remaining part of the code will not be executed. You will directly jump to the next iteration after this.
Okay. Once this continue. So next iteration you will directly jump. So that is the same continue statement you have. Now infinite loop is the like common thing. So if just make sure that your condition is written properly. So while true and okay so that is just like infinite loop this will always be true and similar for loop if you are just writing colon no condition. So that is also uh like related to the infinite loop.
How we can combine the condition? So combining condition like and and or. So here you can see inside this square bracket you can use this and double and sign and double or sign similar to the C programming language and round bracket you can also write in the same way. Okay so these are the some example we will discuss the problems after that just look uh through this parenthesis. So that are confusing part okay in this so you will see sometimes this one square bracket two square bracket two round bracket this thing. Let's clear this. So uh this is uh this one square bracket is written for the test condition. Okay.
And this is a old postix syntax and basic condition statement. We have also one command like test. Okay. So test command we have we can write the expression and before that we can just uh write the test. So that expression will return either true or false. Okay.
So this is for conditional statement.
And similarly this statement is also there. So that's that actually check that condition and we return true or false. So that is for basic and old one.
And now this double square is a like uh advanced best conditions. Okay. That that also support more uh like functionality for testing. Okay. So we will see what things are there. So and this double round bracket actually handle the arithmetic condition calculation. Okay. So that one can also handle the string uh condition as well as the file conditions. But this round bracket actually handle the arithmetic condition and calculation. Okay, mathematic. And this dollar sign I have already discussed. If you want to return something from the expression uh calculation, then you use the dollar sign before that. And this single round parenthesis is used for the run command in a new cell. If you want to execute a some specific command uh like in a new cell that you can write inside this and group command in the current cell. So that you can also write a commands in a one common group. So that with the help of this curly parenthesis.
Now singly square brackets. So you will see uh this type of condition. So test condition this is a one command. So we can just write this in the form of like uh here you can see test 10 gt5. Okay.
So here meaning is we are just comparing 10 is greater than okay. So 25. So this gt means greater than. Okay. So this condition we are checking. So this will be written inside the square bracket in this form. So 10 and then dash gt and then five. Here this there is one strict rule. You have to leave the space uh before and after the expression. Okay.
So that is the like complete structure for this. So you can see one space is coming before and after. So that is required for this. Okay. So there must be a space. You can see this is invalid here. There's no space. This is invalid here. This is uh there's no space. So this is invalid here. This is there's no space. This is invalid. Always give the space if you are using square bracket one square bracket. Okay. So this this square bracket not support this these operator. Okay. So this uh the gator equal that type of operator mathematical operator this not support. Okay. So instead of this it supports this type of options like uh this dash eq means equal n e means not equal gt means greater than lt means less than and g means greater than or equal less than or equal okay so instead of uh this sign we write like this so you can see conditional statement we can write like this so dollar x and if this is gt25 so we can Write like this condition string oper operator we can also use in this. So that is if you want to match two string we can take equal matching we can use this equal sign not equal sign we can use uh this one and dash zed will check that if a string is empty and dash n will represent as a non- empty okay so that matching file operator we can also use so this - f is actually check is the file is a regular file dash d is the file is the direct uh is this a directory dash e If the file exist or not, if this if file is readable, if w if the file is writable, if the dash x if file is executable or not. Okay, ds if file is not empty. Okay, so that is the like condition we can check. So here we are checking if file is a like a regular file or not. So we are checking.
Okay, if we are using dash e. So means we are checking file exist or not.
logical operator we can uh in this we can also write like this. Okay. So dash A. Okay. So this is represent N and D O it is represent uh or. So this is just like a condition with these two two part. So we are just combining more than two condition with the and or or. So this is the limitation. We cannot like uh uh we cannot use a pattern matching in this. So these are the limitation of this square bracket. We cannot check the regular expression match type of matching. So that will not work. And reject will not work. Also this arithmetic operators are also not working. So that meaning may be different. So that is wrong. So if you have basic expression, you can use this uh simple string comparison file testing you can use this uh one square bracket.
Double square bracket is just like a improved version of this single square bracket and uh like that support all the features of single square bracket but more than that. So this is like a syntax. So double square bracket and condition and here we will you can see we can also use this same GT the same things which we are using in the single square bracket. So string operation we can also check we can also support the file strings everything but that also support like better string handling. So in the previous case in this case square bracket if we have suppose string like this John space if we are writing this command okay so dollar and name and if this is equal to like this complete string so this may be create a problem okay this will be create a problem because that uh string will be written like a John and then space then Smith and uh that will not come in the one string that will become a two part actually so it will create a problem but if the same things if we write uh in the double square bracket so that will handle correctly okay so this space inside the value that will handle correctly and that will be matched okay but inside this uh square bracket if you want to match this type of string you have to put double quote here then only you will be able to get the correct answer okay so pattern matching like uh you can match That's the reg like regular expression or pattern matching which we have seen in the previous column. So like uh nodes txt we are getting and we are matching that if the file extension is txt or not. Okay. So we can match like this with the regular expression.
So that actually this support and similarly this uh a stick. So that is also a regular expression. This is support. So regular reax matching always use this double square bracket.
Okay. So logical operator here we can use like uh this actual sign double and or or this not okay like is the similar one. So that support pattern matching rejects better string handling safer variable expansion model syntax. So that is more advanced version of the that one. Now double uh parenthesis. So this is math mode actually. So you can use your expression uh simply just like the C programming and you also no need to use this dollar sign here. Okay, you can see x equal to 10. No need to use this dollar sign. You can directly use x inside this.
Okay. And this is wrong here. Okay. So this is not you just need to write like this arithmetic operator you can use all. So like greater than this all support.
Okay. And you can also use this increment and decrement that type of things like increment, decrement, addition in sort form, subtraction, multiplication, division all type of expression you can use and you can also like solve the complex expression with the help of this combined operator.
Okay. So when to use this double round?
If you want if you are using uh like expression with the mathematical form like numbers that contain only the numbers or counters loops calculation arithmetic condition use this double one. Okay. If you want to return anything from the expression use this uh dollar sign before this expression that will return the value and this is just like a same things we have seen. So uh generally if you are writing this this expression only this will not uh return or print anything. But if you want to print the output of this you have to write like this. Okay. So with this dollar sign and single parenthesis this is related to the to the like uh used to create a subsell. Okay you are just using one cell and uh you want to execute something from the subell. So that is a temporary cell. So you can write the code like this. Okay. So you are just uh suppose you are executing this pwd command in your current cell. Okay. But after inside the this one round bracket you can run this command means changing your directory to temp and you're presenting this directory. So this complete part will execute in the different cell. Okay. And this above command will executing in the current cell. So that will not affect your output. You can see from before this uh subsell you are getting this after this subell you are getting the same. But in between that you are getting the different things. So that is executed in the another cell when to use temporary directory change temporary variable modification. So like this type of use case. And next is braces braces group command without creating a new cell. So you can group the command like this. Okay. So you can write some set of command uh here and you can execute. So this this here the effect you can see because both will be executed in the same set. Okay. Okay. So if you change anything inside this that will reflect outside of this.
>> Okay. So this is the all over like uh basic idea of the today uh problems and like conditional statement cell scripting things. Now we will move to the problems.
So yeah I have released seven problem today.
Okay. and seven problem. Uh let me just open each problem now.
Problem 1 2 3 4 5 6 7.
So one second I've tested this I think.
Okay. So I'm removing this. We'll start from the sketch.
So this is classroom practice problem.
Okay.
Let me just open again.
Okay. So I have released this seven problem. You can also open your in your side and you can also see if you understand the basic uh you can start to solve this.
So this week we are just seeing some basic control statement based column but next week we will also see more advanc scripting based. So here now first problem you can see.
So if you see student grade calculator.
So problem is statement. A teacher wants to automate the process of assigning grade to student based on their marks.
Write a cell script that reads the marks of a student and print the corresponding grade. Okay. So this is very uh like uh this is very common problem which we have already seen in the C programming course also. So grading system is given some range are given and accordingly you need to print the grade. Okay. So A B C D F and if the like enter marks are less than or greater than to the 100. So you you need to print this invalid marks that one. Okay. So we will write the solution uh using the cell script. Okay.
Okay. So here sample input is given. If this is the input, this should be the output. If this is input, this should be the output. So this is input output based multiple input output are configured like other programming language. So we will just use our cell scripting to perform this here. So we will just write the so I hope you know that how to like execute generally uh this uh cell scripting. So first we create the sh file. Okay. If you want to execute these things in your normal like terminal, okay, in the Linux terminal.
So create a like uh any solution. Ssh file and after that open that file into the vi mode, vi editor and write this the complete solution code. So whatever we are writing here. So that is the content of the file. After that if you want to execute that file, simply save your file and then change the permission of your file in executable. Give the permission uh executable permission.
After that you can simply write this write this command like solution.sh.
Okay. So that uh enter that and it will be execute. So that is the way to write the script file and execute the file.
But here uh this is like a uh some interface. So we are writing the content only and we'll execute directly from the test button. Okay.
So we will write the cbank first thing.
So here's this uh bin.
Okay. After that this question is saying like uh we are giving input format a single integer representing the marks of the students. Okay. So first line. So we need to read one input from the user and we have the command for that is need.
Okay. And we will just take as like marks.
Okay. And this is like a variable we have declared. After that we will write a conditional statement for that. So first condition we will write like we can write the condition for this invalid condition. Okay. So we will just write if and after that we will just check the condition. So we can use directly this round bracket. So that is I think fine.
We can directly write our uh condition without with the help of normal operators. So if marks marks are less than to zero. Okay. And after that we have the end condition. So that is end and if our marks are uh greater than to 100.
Okay. Uh okay. So this is not and sorry uh or because either our marks should be less than zero or it it is greater than zero.
Both are invalid condition. Okay. For the marks marks should be within this range 0 to 100. So this case like write it then and enter and space and eco. So to print the output just use the eco command and write the invalid marks this message as it is. So invalid marks.
Okay. So this first condition we have written. Now we have more conditions. So we have this condition like 90 greater than 90 greater than 75 greater than 60 greater than 40 and else part. Okay. So we will just write the L if command now L if and we will write the condition again in the same way. So if our marks is greater than or equal to 90. Okay. So that covers this condition 90 to 100.
Okay. If our marks are valid if that are greater than or equal to uh 90. So grade should be a okay. So grade should be a.
So that is now again we will write it then and then we will just write a eco command and then we will print the a grid for this. Okay. So that is first one. Now lf again and we will write the condition. So if marks is greater than or equal to uh this time this range is 75. Okay. So 75 and now we will write this then and again equal B grade. Okay. So you can see how we are writing the conditional statement and uh next is again one more command. So L if and marks greater than equal to and this range is uh 60. Okay. So 60 and this should be 10 and equal C. Great. And now next is one more LF command and that is if our marks are greater than 240. Okay, then equal to 40. So that grade is Okay. D. Now the else part. So else part we no need to write. Then simply write your eco message. So eco and f. Now our complete structure is done. So write the fi.
Okay. So this is now a one complete statement for the conditional statement.
You can see how we read the marks. After that we are writing if l if l if l if l if else part. Okay, we have written all the condition like this and we'll check the test case and this is okay. This is uh failing something invalid marks. Okay, so we have just uh written the this marks small but that should be capital M only.
Okay, now it should be passed. Okay, all test case passed. So here this is we have multiple test case two public and five private.
So in this way we write the like uh scripting program with the help of conditional statement. So I hope this is clear.
Okay. So just practice with this because uh at least one of the question will be based on this type of scripting uh simple conditional statement in the OP exam as well as uh you may handle the more difficult problem with the help of this control statement. Okay. So do not uh like just read the things practice as much as possible in this uh syntax because this is new uh this is not exact similar to the C programming. So what is the common mistake if you not practice?
So most of the student write the complete C syntax and that not works actually okay something is changed you can see then we are using okay we are using this AI something so please practice on that to comfortable this okay so this is problem one let's move to the second problem here this uh code is again written I have already done before I think okay So uh so this electricity bill generator so this is again a conditional type of problem. So here we have like uh units as a input. Okay. Now we are generating the bill and first 100 units is charged by the five rupees. Next 100 units generate by uh like uh charged by the seven rupees and after that next uh above 200 units are charged by the 10 unit. Okay. This is not a range. Okay.
This is a continuous slab. If your unit is 250, you can see if your unit is 250.
So first 100 units should be become uh will be charged by 5 rupees. So 500 for first unit. Second 100 or 700 and more than 200 whatever unit you have that is only 50. So that will be charged by the 10. So that is the continuous chain you have. Okay. So the common thing is sometime if you are getting some inputs like 250. So that you directly applied the 10 into 250. So that is not like this. Okay. So here this is as a slabs.
So we are getting like a lead units.
Okay. As a input part. After that we will just uh check the things. So say now we will also take one uh variable will equal to zero. Okay.
And now conditional say if if units are less than 200. Okay.
Units are less than or equal to 100. Okay. So in this case then how we will calculate our bill? So that is bill equal to write the expression and we'll use this uh dollar sign. Okay. So we will return this calculation to the bill variable.
So that will be calculated by the units multiply by uh five. Okay. So this way we have calculated this. Now L if conditional then we we check this condition. If units are less than or equal to uh this 200. Okay. So that is the second uh condition. Then now build equal to and then dollar sign and we will write this parenthesis and we'll write the condition like first 100 should be multiply by five then plus and next like uh remaining unit more than 100. So that is units minus 100. Okay.
So that are the unit will be charged by 7 rupees. Okay. Okay. So this is the calculation for uh second condition. Now third third is else part. Okay. So we can directly write this in else part because only one condition is remaining.
So bill equal to dollar.
Okay. So now first 100 * 7 plus second 100 multiply by uh sorry 7 and that first is five.
Okay. and plus next is unit minus 200. So whatever units are more than 200 that will be charged by 10.
Okay. So that is done. And now fi our block is done. And now just print your bill eco and then dollar uh this bill or you can write without also.
Okay, we are printing our bill. So this is the condition we have written and we you can see how we assign the value of our expression to our variable and we'll see our all test case are okay fine genetically correct.
Okay. So you can see how we can assign the value to the variables. Always make sure that do not give this space. Okay, this is also very common things which create the problem.
This assignment is without without space always. Okay. So this is the second problem. This is also conditional based.
Now move to the third problem. And this problem you uh have seen like uh uh reverse a number. So reverse a number uh how we reverse uh if you if you can remember this problems also we have seen in the C programming language. So the idea behind this is simple. So like if you have any integer number the pen correct divided by 10. Yeah that logic we will apply here.
Open the pen first.
takes time.
Okay. So the idea behind this is simple logic. We have number like 1 uh 2 3 4.
Suppose this is n. So what we will do?
We will just repeat the process. Uh okay. So we will just repeat the process every time we will just find out the first digit. Okay. And we will also take one reverse like number reverse equal to zero. So that is the initial part and we will just find out this last digit. How we will find out this last digit? Simply perform n and this remainder operator and then 10. Okay. So this will divide by this 10 and will return the remainder. So this will return only the four digit. Uh okay. And suppose this is like a d equal to we are performing this operation. So this will give four as the first iteration. After that what we will do? We'll just write our uh reverse value as a reverse equal to reverse into 10 and plus d. Okay. So we will perform this code. So this initially it is zero.
So 0 * 10 is now 0 + d. So that will become four. So first digit will become four. And now we will update our n by reducing this digit. So how we will remove this digit? So that is simple n= to n / 10. So this will return only the coian part. So that will only return 1 2 3. So that four is now removed. So we will repeat this process for every like one by one. And next iteration you can see we will just remove this three and three will be multiply like this. So 4 into 10 + d. So that means 3. So this will become 43.
Okay. So 43 and now this will become 12.
Okay. Now we will just do this. So 43 * 10 and + 2. So this will become 432 and now it is remaining one and we will just remove this. So it will become zero. So now that will insert here. So 432 into 10 + 1. So that will become this. So in this way we will just do this and we will run this process inside the while loop because we don't know what is the length of the number. So we will just repeat this process until our n is greater than equal to zero. So like while n is greater than equal to zero we will repeat this process whatever we have explained. So we will repeat this process with this condition. So once our like uh n is become less than zero or equal to zero. So this loop will terminate and meanwhile all the like digit will be reversed. We'll get our result. So that logic we will apply here. We will use the while loop for this. And in the cell scripting.
Okay. So the number is written like a one number is given. So just use lead and num. And after that we will just take the condition like while and n is greater than zero. We have defined this condition. Inside this with while we write the do okay do and after that we write the expression. So that expression will be like uh we will take the first value as say uh so reverse or we have not defined the reverse here. So we are just before this R E F equal to zero. Okay. So we define this first. Now after that we are taking digit.
So digit equal to and we will do the same things.
Uh inside this we perform the operation.
So n floor division by 10. Okay. So that will return our last digit. So that is the first expression. After that we will just add this last digit into a uh reverse value. So that re V equal to and the CNC we will write E V * 10 + uh digit.
Okay. So this is the second expression and now we will change our number so that n = n / 10. Okay. So this is the third and this loop will be done. So now this is the stop thing. So, so while condition do enter in between just write this sequence of expression at the end just print your reverse. Okay. So that is so that is the like solution code for this and let's see it is giving the correct answer or not zero output. Okay. So let's see what mistake we have done mobile.
Okay.
Num place we have to take.
So here actually it not checks actually that variable is defined or not. So this not generally not gives any error. you have to figure out by your own. So as you can see we use the n but we never use a declare that anywhere but it is not giving any error here also now.
Okay now looks okay now all fine. Okay so all numbers are coming as a reverse 0 89 like this.
Okay. So in this way we use the while loop. I hope this is clear while how we can use the while loop and how we write the all statements inside this while for this. Okay.
Okay. It's fine. Shall we move to the next?
Okay. So let's move to the next. This is also very common uh problem. Prime number checking. Okay. I hope you know the logic for this. How we check the number is prime or not.
And in this we will use the like a for loop. Okay. So we will use the for loop and conditional statement. So how we can use the conditional statement with this.
So uh like question statement. Well clescript t. Okay. This uh question is like in different nature. First value is as a number of test case. Okay. Here we are not taking one input at a time. We are taking multiple inputs. So that first value is representing how many inputs we are giving for this test case.
After that that number of inputs we are giving. So means three is the number of input then we will check output for every input. So like two is a prime number, 10 is a not prime number, 13 is a prime number. Okay. So that output is coming for all three value. So we have to handle this also. So means first value we are taking as a number of test case in the one input and we have to run the loop. Inside the loop we will read the input one by one and we will return the output for every input. Okay. So we will do this complete process using the for loop and conditional statement.
So first thing we will read the number of test case. So like read and I'm just taking t. So t is just representing the number of test case.
Okay. Then we will run a loop. So for and now same we will use here.
So TC I'm just taking the one variable new variable TC equal to 1 I'm assigning and then colon and where the TC is less than equal to T number of test case and then TC++ okay so this is just handling the number of input and inside this what we will write do okay and then we will just also write done for this and we will do the complete remaining process for this.
So now the thing is for each test case now we are going to read the input one by one. So like three input is there now 2 10 each we will read one by one. read again and that is like a number n we are reading n uh okay so so how generally we check sorry so so read n is now will read one of the value from the input and we'll check that is a prime number or not so first condition we will check for that like uh if and we are checking if our n is okay n is less than uh two or equal to 1. So that condition if you see that so that is uh then and we can directly return equal what not prime numbers. Okay. So not prime number.
Okay. Because any value which is equal to one or less than one is a not prime number. So that first condition we have handled and we will stop the process means we will use the continue statement here. So continue.
So we will not further check the remaining part. We will directly move to the next uh input value checking. Okay.
So by the continue statement and then then is file. So that first part we have checked. If this is become true then our output will be printed. Now for the remaining part what we will do? We will just take one variable flag equal to zero. we are assigning this and zero we are assuming that our number is prime.
If at any point if our number is divided by any number uh before that number so we will make this flag equal to one. So how we will do this? So we are taking one uh loop here so that like I = 2. Okay. And I should be less than 2 N we are taking and I ++ and for this we will just perform do.
Okay. And done.
And this. Okay. So here we will check if our number is divided by. So if n is divided by like uh i. If that become equal to equal to zero. Okay. So then we will change our flag here. Okay. We will change our flag to one.
Okay. And we will break the process. No need to check if any number divide the n completely. So no need to check the remaining part. You can directly break the process. Break the loop and we'll check the next. Okay. So break the loop and uh then this is fi on that is done. Okay. So after this loop is done check your flag if your flag flag equal to equal to zero. So means it is not changed. So for that then uh eco prime number.
Okay. Else equal not prime number.
Okay. So uh that is done. Now f_subi. So that part is done. So our code is complete now.
You can see now this is the complete code. So inside the test case loop we are just reading the input one by one.
We are checking if that is less than equal to one just print the reject.
Otherwise we will set the flag equal to zero. And for this flag uh we will just change it to one. If our number is divided by any i from for value two to less than n. We will change this and break the process. And later we will check if our flag is still zero that number is prime number otherwise number is not prime number. So that code is we have done and see yeah it is passing our test case also.
Okay. So here you can see minus 5 is also coming not prime number and the other numbers are coming as required.
Okay. So you can see how we now combined the things. So we have written the for loop as well. we have written the conditional statement or nested for loop as well. So that is handling the all things. Okay. So I hope this is clear.
Okay. So all these problems you have already solved. What we are doing new is we are using the new syntax this cell scripting and we are solving all the problems. Now next fifth problem.
So here number guessing game problem statement write a cell script that stores a secret number as five sorry 25.
The user has to guess the number the program should repeatedly ask the user to enter a number until the correct number is guessed. So if the enter number is smaller than the secret number print too small. If the entered number is greater than the secret number print too large. If the guess number is correct, print correct guess. Okay. So here what is happening actually we are getting multiple input sequence. Okay.
So 10 40 25 like this way and we have fixed number secret number is 25. So once this 10 input will come we will print two less. If our value is like new value is coming as a greater value for the 25 we will print two large. If at any point we are getting the same value so we will just print correct guess. So this is the sequence we don't know how many it required. So in such type of case you have to use the while loop.
Okay. And this no condition is also or you can al like run a infinite type of loop and break the loop if you match the correct guess number at that point.
Okay. So in this way you can use the while loop here and read the input every time and if your match is uh correct at the time break the loop. Okay. So how we will do this uh h and now read uh inside the while loop.
Okay. So we have the one secret number.
So like uh s equal to like I'm just assigning 25 for that. We will just compare this or you can directly compare with the value in your loop.
>> See can you show the previous answer one second just some issue.
>> Yeah this one this is a complete solution code for okay.
Do we have any query in this?
>> No sir, I I think I did a typo actually.
>> Okay, >> I will check it again.
>> So now uh sec 25 what we will do? Uh because we need to read the input at the same time we print the output for that.
Okay. So that things we have to do. So after reading 10 we need to print something then 40 then print something like this. So we will just run a loop.
So while okay and inside the while we can just write a true condition. So while true. So that is just like this loop we have and this condition is always true always. And now do so that is the structure of loop and in this structure we will read the input.
So read uh our end suppose. Okay. And for this or we can write num.
So num. And now we will just match this.
Okay. So if our num is greater than okay. So greater than two or we can uh greater than or we can write in any sequence that is fine.
So greater than two secret numbers.
Okay. S E C.
So what we will do? We will just then and echo.
So here the condition is if our number like current guess number is greater than the secret too large and that is too large.
Okay. So this is the first condition. L if the number is less than to the sec.
So then equal to small or both condition are done. Now else part simple equal correct guess.
So now this is the while loop we are running and and we will break the process. Okay. So we have to break here.
Yeah.
So this is a complete loop we have written. So you can see when our like uh number is matched we are breaking otherwise we are continuously reading things. So that is the question actually. So read your number until your match is correct.
So that is let's test this.
Okay, something is error in syntax. So to done, okay, we missed the if condition. So fi.
Okay, so if if fi Okay, something is failed. What is mismatch?
Like too large is okay.
Too less.
Oh, sorry. Too small.
This also looks correct. Correct. Gu U E S.
All distance looks correct. Anything is else is given.
So that is two problems should repeatedly ask the user to enter the number until the correct number is guessed. If the enter number is smaller than the script number, print too small.
Too uh too small.
If the vendor number is greater than the secret number, print too large.
Okay.
Too large.
and correct guess.
Okay, question. Our solution looks correct. I think maybe some test case error.
Let me check question it is.
So that is number five.
So uh 10 So 10 is too small. Uh too large to large too small that guess something is check logic wise is correct. I will check all the private test case. So maybe some uh mistake is there in one of the test case.
Okay.
So that we are not able to.
Okay. So this is the while loop. We have seen how we can use the while loop and I will update the test case if any test case is wrong.
Any query in this? Shall we move to the next?
Okay.
Yeah. So, a strong number checker. So, here uh the problem statement a number is called a strong number if the sum of the factorials of its digits is equal to the original number. And uh this number is like 145 is a strong number because factorial of 1, factorial of four, factorial of five. Uh if we add all these numbers, we are getting 145. Okay.
So in this uh way we will get our uh factorial number and we need to print what strong number or not strong number.
Again I think this is test case based.
We could check actually.
No only one single test case is there.
So uh we will just apply the same things. So inside here also we have to run a loop. we have to divide every like we have to get the digits and we have to calculate the factor for each digit and we will get the sum and we will match the sum with the original number. So that is the idea like uh digits we have to like filter and we have to calculate the factorial for that then we get the answer. Select has bin / okay and now uh so original number we have select n u m then sorry read.
So just read the number.
Okay. And now cop you can copy this number. So you can take like one more variable.
Nice.
I'm just writing o rg original number because we will just modify this in the while loop. So original is just like a dollar and n copy this and we are also getting sum uh to get the sum for each factorial value that is assigned to zero initially. Now running a loop while when is our num is uh greater than zero. So inside this loop inside this loop we will do two things.
Okay. So we will just uh okay get the digit now.
So now digit digit equal to round round num 10. Okay. So now we got the digit. Now we need to calculate the like factorial for this digit and we will add that digit into the sum. Okay. So that is the next thing. So sum do sum equal to become zero. So, so for factorial we have to take one more variable equal to 1 initially and now run a loop.
So for for i = like 1 and i is less than equal to digit and i ++ So here uh f a c equal to so that f a c that will be multiply with i.
So you can see we are getting this factorial uh for this each uh this digit. Okay. And after this loop we will add this into our sum. So sum equal to uh this sum plus uh sum plus f. Okay. So that part is done. So in this loop actually sum will be added. Uh okay this do while uh that is done.
H after this while loop what we will do?
We will just check if our sum is equal to equal to the original number. So if like this sum is equal to equal to RG original number then we will say then equal.
So that uh it is defined here strong number else not a strong number strong okay strong number so that is the like final tell things our program.
So I hope this logic is looking correct or we have one fi also condition and anything we are missing.
No I think sum is defined zero then x sum= to sum plus this f = 1 mult* all the things I for the digit.
Yeah.
>> So looks fine. Let's test.
So this code will run on the terminal very fast. Okay. So here it is actually the API based thing that type of things it takes time.
So this is similar that recursive right >> sorry >> this is uh in C we did recursive same thing right similar stuff right >> no this is not a recursive we are not using any function right now >> know that f a c a fact is equal to that fact into i thinking that way >> be very simple we are just taking fact from that till the digit we are adding.
>> Okay. Okay.
>> Yeah. So f is assigned to one now. So one into then one then next digit two then three. So that is a factorial calculation.
>> Okay. Okay.
>> All multiplex until one to digit.
>> Yeah. I think one thing we missed.
We have not updated our num. Actually this is going to infinite loop I think.
So instead you can see num we have assigned greater than zero. But never we have update our num.
So that we have to update this num also.
So num should be updated to num divide by 10.
So that we missed. So because of that I think it is not now it is running a strong number and our code is not printing anything if sum= to RG sum equal to G then equal strong number else not strong.
Now what is the possible error in this read num equal to copy the data.
So that is fine to zero del.
So for i = 1 i is less than equal to digit and i ++.
So that factor is calculated and sum equal to sum plus fact = 10 if sum= correct. Correct. What happened?
Oh, I don't know. So, it is giving the correct answer now for all test case.
So, maybe that is this platform error.
But not now it is printing the things.
Okay. So, this is uh like a one complete use case of while and for and conditional statement. We have everything.
So this is the solution for sixth problem. Now one problem is there uh I hope uh you should try this that is okay. So that is something different.
Huh. So password validation system.
Okay. So a website wants to check whether password entered by different user are strong or weak. So write a cell script to first read an integer T.
Represent the number of test case. For each test case, read one password and validate it using the following rules.
Password length must be at least eight character. Okay. And password uh must contain at least one uppercase letter, at least one lowerase letter, at least one digit. All three should become for each password. Print valid password. If all conditions are satisfied otherwise print invalid password.
Okay. So three test case are there. So here you can see valid password. So means one upper case one small uh lower case and one digit at least should be there. So so that are the condition now we have to validate. So here you you can see some type of pattern matching is required actually. Okay. So pattern matching we have seen the double square bracket uh and then double square bracket we can use the reax to find out this uh if our pattern is matched.
Okay. So let's solve this also. So has this plus/ bin / best.
Okay. So here we have one test case. So like read t and run a loop for that.
So for like we can take any variable = 1 and TC and equal to TC ++ done.
So for this we need to check everything.
So first thing is we will need the password. So password this time it may be in uh any like form.
So we have uh read and pass. Okay. So I'm just writing or pwd I'm writing uh pwd is a command. So that needed on password complete. Okay. So read password. After that we need to check all the conditions. So what are the condition we have? So condition we have this at least uh length should be at least eight character. Okay. So length uh string password length.
Okay. And uh second condition is at least one upperase letter at least one lowerase letter at least one digit.
So all should be actually matched.
Okay. So here we will use the square bracket double parenthesis.
Okay. So first thing is for the length of your string. So whatever length is coming. So how you can get this?
So there is a h has command you can get the like uh length of that uh your string. So that is has and password.
Okay. And we will just you use these things as a value. So like total value that uh dollar inside this bracket.
Okay. So this has actually will return the length. Okay. Total length of this uh string and that should be matched with the condition. So that here we will use the GT. So that gt greater than or equal equal is uh at least eight character.
So greater e. So g e we will write. So greater than or equal to 8. So this is the first condition we have written our password length should be greater than or equal to 8. Okay. And second condition we will write and now we will use the reax thing here.
So reax will be written as a password that should so that is the sign is I think this sorry this one. So that should we be come within this A to J range capital letter.
So A - J. So this is one pattern means uh something should be matched in this uh range. So we will check uh one second or a password.
That is the condition.
Okay. So the text to chat should matched.
Okay.
Okay. Okay. So we are validating like something should be matched from this that should contain at least one upper case, one lower case and one digits in the password. So that is sign actually this value actually should be something should be matched in this one. Okay. So that a to j and we will use the end operator again and we'll write the same things has password some part should be matched with this uh small letter so that small letter is range is a to j okay and then end sign and that last thing is at least one digit so that uh some part should be matched with the numeric number so That is dollar password and that should be matched with this numeric 0 to 9.
Okay. So that conditions we have defined as this and these all these match because we have written all the condition with end. If all this matched then only we will just print then equal valid password. Okay. So valid password as equal invalid password and then FI.
So this is the syntax. Let's run this to see any hello oriented things. Yeah, it passes. Okay. So in this way we can check use the regular expression here.
So you can see we are using double square bracket inside this double square bracket. First thing we are checking the length of this string. So that is should be greater than or equal to 8. And condition we are checking if some part is matching with this uh capital a to zed on this password and something should be matched with this small a to j and something should be matched with this uh numeric digit 0 to 9. If all are actually satisfied then only the overall condition is true then only this valid password will print otherwise if any condition is become false not satisfied.
Okay. So that it will be invalid password.
So if you have such type of like requirement of reax type of matching always use this square bracket. Okay.
And write the expression like this.
Okay. Otherwise simple mathematical expression you can use the round double round bracket that is like very fine. Uh you can use simple normal operators.
So that is the last problem seventh problem for today.
Okay. Yeah. Yes. Yes. Hmon. Uh >> sir, could you please solution of the all the problem? Sir, I have to take a snapshot, sir.
>> Okay.
So, this is the first.
>> Please wait, sir.
Done, sir.
Okay. Second, first try to solve by your own. Okay.
After.
>> Yes sir. Yes. Yes sir. Yes sir.
>> Just do not just complete the things.
>> Yes sir. This is third.
>> Second.
>> Second computer sir.
>> Third one. This one.
>> Complete sir. Next sir.
>> This is fourth one. And I think this >> complete >> uh one second let me just reduce the size.
>> Uh now it's complete.
>> Okay sir.
>> Fourth.
>> Uh fifth one is small this one.
>> Fifth. Okay.
>> This is sixth.
>> Yes sir.
>> Okay. This is seventh.
>> Seventh.
>> Thank you sir. Thank you very much sir.
>> Okay. After solving all these problems here also try to solve these problems in your uh Linux terminal. Okay. And then run through the file like create the file, edit uh edit the file, write this code in your file and then run your script file. Okay. Then see how that is.
So okay. So that's the problem for today.
next week. Huh?
>> Uh sir, uh what should we done, sir? Or terminal, sir? What are you saying, sir?
Could you please?
>> No, right now we are writing everything uh in this terminal. Okay. But uh we should also have the practice on the terminal uh actual terminal. Okay.
>> They have different questions. Sir, >> no, not the problems. Just practice on your local terminal uh on the either course VM or anything. just write the same things here like how we write the code like so I'm just connecting one ssh okay so here how you can run the things so like uh let me just move to sorry so here how we can write the code and uh we can run the things. So like uh we can create a new file suppose uh a sample dosh. Okay. So uh this file I have created now I can write everything here also. So has uh same thing. So /bin sl and write the code here. This is script file. So like read A. Okay. Select read B and just solve the problem like S equal to R uh A + B and uh equal and equal and then dollar S. Okay. So just simply read two input and uh sum print the sum of those number. So that we have written here. So just save this file uh in the terminal and uh just change the permissions. So ch more and uh what was the plus x give the executable permission and now aps the sample. CH okay so we have changed the permission of the dot / APS and just run. Okay. So we are now running the script file and give the value like 12 first value then uh 23 second value and now we are getting output 35.
So in this way uh after solving the problems on this editor this online GDB you can also practice on the your editor how to write the code in the script file how to run the script file and how to get the input from user and how to get the output. Okay. Okay. So this is like a user input. We can solve the all things from the command line. So that command line we just change the code. So like aps here still uh taking this from here. What I will do I'm just removing all these things.
And now uh we can just write this dollar one and dollar two two. I think that should work or you can so this is expression we cannot write like this. Okay. So here you can take like this dollar uh one argument and now B equal to dollar two argument. Okay. So just remove this from here sorry A and B. Okay. So now we will just pass the input through the command line argument.
Okay, so this is the command line argument w and we will run this script now and we will pass the value at the same time in the command. Okay, so 12 and like 45. So you are getting output 57 here. So this is called as a command line argument. Okay, how we are passing the argument in the command itself when we are running the code. So it's 12 and 45 is now 57.
So this you can see how we got the command line argument in our variable.
So simply dollar one is the first argument dollar two is the second argument we take into the variable and then got the answer. So this is the two way how you can read the input from user or how you can take the input as a command line argument. So that so uh I'm just saying that practice on the terminal itself. This is just like a web interface. We are just writing the solution and we are not running any command to run this. We just click on this test. So this is the UI things but also practice on the command line terminal all the same things. So that was my actually.
Okay.
So next week uh we will dis we will continue this and we will see the more like uh advanced things in the cell scripting like function we have we have array that type of concept. Okay that combination we will use.
Okay any query anyone?
Uh one more thing. So still you have 11.
So let me just uh take the surprise test for this week. One second.
Just wait for a few minutes.
Okay. So try Okay, close.
16.
Okay, I'm sharing one form. So publish in the meeting chat.
Okay, I've shared the form. So you have like uh 10 minute for this and complete this.
so 6 uh 50 I will sir. Email is a personal email I id sir.
>> No uh no your student email ID.
Yes.
Related Videos

TOP 15 Data compression Interview Questions and Answers 2019 Part-2 | Data compression | Wisdom jobs
wisdomjobs
281 views•2019-06-28

CTS 158: 802.11w Management Frame Protection
ClearToSend
4K views•2019-02-04

NDSS 2019 Send Hardest Problems My Way: Probabilistic Path Prioritization for Hybrid Fuzzing
NDSSSymposium
496 views•2019-04-02

How realistic is Cities: Skylines?
CityBeautiful
159K views•2019-02-14

GUIs & TUIs: Choosing a User Interface for Your Python Project | Real Python Podcast
realpython
2K views•2025-04-04

The OSI Model - Explained by Example
hnasr
225K views•2019-05-12

Cloud Computing - Introduction
elithecomputerguy
98K views•2019-10-07

From Traveler's Dilemma to Dynamic Routing | Demystifying Networking
IITBombayJuly
5K views•2019-08-04
Trending

WOW! Judge TURNS THE TABLES on Trump in His OWN $10B LAWSUIT!!!
MeidasTouch
197K views•2026-07-23

Playstation NO DISC/NO BUY Fight Is Over...
DavidJaffeGames
4K views•2026-07-23

Steam and Xbox Just Dropped The Hammer On PlayStation
OhNoItsAlexx
9K views•2026-07-23

Americans Confused in Australia for 17 Minutes Straight
IWrocker
17K views•2026-07-23