# SOFTWARE ENGINEERING AT BLOCKFUSE LABS: WEEK 3 Week 3 was what you will define as action packed! there was a lot learning and hands on activities involving various aspects of shell scripting. **WEEK 3 RECAP AND COURSES/TOPICS** **SHELL SCRIPTING:** For week 3 we continued with shell scripting that was introduced in the week 2 of the program. Under the shell scripting we looked at various topics like; **CONDITIONAL STATEMENTS** We looked at conditional statements and what they are used for; these statements are used to test for various conditions or instances of a program. These statements are used to check if certain conditions are passed by a particular program. Under conditional statements we looked at IF, ELIF, ELSE statements along side WHILE LOOP and FOR LOOPS. **IF statements:** These statements have a syntax like; ``` if [ condition ]; then do this fi ``` This if statements also house the ELIF and ELSE blocks; ``` if [ condition ]; then do this elif or do this else or else do this fi ``` An important thing to note while studying the statements are the test or single square brackets [ ] and the modern test (compound commands) syntax which involves using double square brackets [[ ]] and also double parenthesis (( )). The old test syntax is the old method used in shell scripting and even though it has its limitations and best used cases, it is still very much used up till date. The modern test syntax or compound commands still uses and supports all options used wit the old test syntax and also provides better ways of handling situations that involve the use of regular expressions (Regex) and arithmetic operations using arithmetic symbols. **LOOPS:** Part of proper and good programming is to have a program run independently on its own or having a program be automated without having the user or programmer do a certain task over and over again per given conditions. Loops are very useful when it comes to automating our tasks, these loops house a particular block of code and runs repeatedly until all desired conditions are met. While loop: these have a syntax like; ``` while [[ condition ]]; do this done ``` for loops; For loops are pretty much straight forward and have a syntax like; ``` for variable [in words]; do commands done ``` where variable is the name of a variable that will increment during the execution of the loop, words is an optional list of items that will be sequentially assigned to variable, and commands are the commands that are to be executed on each iteration of the loop. CONCLUSION: Using these topics we were able to do various tasks and work on tasks that involved input validations where we built a school grading system, a lucky number fetcher and also a car engine logic. For my car engine logic I built an automated car that accepts commands to drive. [https://github.com/HellblazerXXL/bfl-software_engineering-zero_day/blob/main/Day07/while_loop/car_engine_logic](https://)