Last week, we covered the basics of the lists in Computer Science. A common operation on lists is traversal of the list. Traversal is the process of accessing each element of a list in order and performing some operation. Let’s see how we can do it in SNAP!. While accessing each […]
Author: Silvia Doomra
Introduction to List in SNAP!
We use lists every day. The most common list we use our life is a shopping list. In this blog, we will see how lists can be represented in Computer Science (specifically SNAP!). Characteristics of Lists Before we jump into how we represent lists in Computer Science, let’s discuss what […]
Why Should I Start a Blog?
Ten years ago, I could have never even imagined that I would write a blog. I was never good at writing, and maybe that was the reason that I became a software engineer:). Jokes apart, I certainly didn’t think that I had what it takes to be a blogger. However, […]
Using Loops in combination with Conditionals
This week, let’s discuss combining two concepts we have learnt in the last few weeks: loops and conditionals. As discussed in those blog posts, loops are used to execute a code of block multiple times and conditionals are used to define if a particular block of code will be executed […]
Boolean Expressions and Operators
In the last few blocks, we learnt about predicate blocks and conditional blocks. What is one thing common in both of them? Well, predicate blocks evaluate to a boolean value, that is true or false, and conditional blocks use boolean expressions or values to define the code flow. In this blog, we will deep-dive into the boolean […]
Introducing Conditional Blocks
Although I have been using conditional blocks in many of my blogs/lessons, I forgot that I have never formally introduced conditional blocks so far:). So let’s cover those today. The idea of conditional blocks is pretty straight-forward and intuitive. Conditional blocks are the blocks used to make a choice between the […]
Using Loops with Inputs
Last week, we covered what is a nested loop and how to implement it in SNAP! In the program we developed last week, we had minimal user activity. We defined the problem to draw 2 squares next to each other, and hard coded the number of squares as 2 in the […]
Using Nested Loops
In the blog post, Using Loops, we discussed that loop is a type of block which is used to run code multiple times. It is useful in reducing code redundancy and increase readability when dealing with repetitive tasks. Continuing to build on the example of drawing a square, what if […]
Predicate Blocks in SNAP!
In the beginning of the year, we discussed Reporter Blocks and their use cases. Today lets’s talk about a special type of Reporter Blocks, known as Predicate blocks. Predicate blocks are of trapezoidal shape and must return true or false. Some of the examples of predicate blocks in Operators palette are: and in Sensing palette are: […]
Dealing with “One More Thing…” Syndrome? The beautiful story of life!!!
Each one of us has the feeling of “One more thing…” now and then. While I was reading “Awaken the Giant Within” by Tony Robbins, I came across this beautiful piece of text, which I thought of sharing with you. In truth, life is a balance (in being realistic and […]