# LoGIC 101
This week at blockfuse labs has been the most interesting week yet for us as we got introduced to the concepts of logic as a software engineer.
Logic on it's own is an important part of programming and it shows how different solutions can be used to achieve a said problem.
Haven't Spent the week learning new and logical ways of solving problems using conditionals like the if, else, elif and so on to tackle problems.
Logic 101 with Bash scripting isn’t just about writing code—it’s about learning how to think. By mastering if, else, elif, while, and for, we’ve taken our first steps into structured thinking and real-world automation.
#!/bin/bash
engine="off"
while true; do
echo "Enter command (start, stop, exit):"
read command
if [ "$command" = "start" ]; then
if [ "$engine" = "on" ]; then
echo "Engine is already running"
else
engine="on"
echo "Engine started"
fi
elif [ "$command" = "stop" ]; then
if [ "$engine" = "off" ]; then
echo "Engine is already off"
else
engine="off"
echo "Engine stopped"
fi
elif [ "$command" = "exit" ]; then
echo "Shutting down..."
break
else
echo "Unknown command"
fi
done
This was a car engine program we created and it was a lot of fun doing it.
Whether you're automating tasks, simulating a car engine, or just exploring how code can reflect human decision-making, this is where it all begins. Bash gives you the foundation to understand logic that applies to all programming languages.
Master the basics, and you'll be ready for anything the tech world throws your way.