NetsBlox Exercises

Welcome to the official collection of NetsBlox exercises!
Learn to program using NetsBlox by exploring the 30 exercises that span a variety of topics and concepts.
For more information about NetsBlox, check out https://netsblox.org!

Acronym

higher-order functions

Given a short phrase, can you report the acronym for it?

Actor's Birthday

Implement a function to get the birthday of an actor using the MovieDB service

Anagram

Check if two words are anagrams

Atbash Cipher

Implement the atbash cipher, an ancient encryption system created in the Middle East

Between

Create a function to check if a given number is between two other numbers

Bigram Autocomplete

loops
lists

A language model is a probabilistic model of language that can generate a series of words based on example text that it was trained on. In this activity, we will be making a custom block to create a simple language model based on bigrams! A bigram-based language model keeps count of how often each letter follows every other letter. Using these counts, it can guess the next letter will be based on the current one!

Caesar Shift

Implement the Caesar cipher, a famous classical encryption technique used by Julius Caesar

Compute the Average

Given a variable list of input numbers (expandable slot), compute the average

Compute the Average of a List

Given a list of numbers, compute the average

Counting Letter Frequency

Count the letters in a large text and return the counts as a list

Counting Letter Frequency as Dictionary

Count the letters in a large text and return them as a table (recording counts by letter)

Cracking the Caesar Shift with Brute Force

Crack a message encrypted with the Caesar cipher using brute force

Cracking the Caesar Shift with a Partial Solution

Given a single decrypted letter, crack the Caesar cipher

Cyclic Iterator

higher-order functions

Create an iterator over items in a list that restarts when it reaches the end

Factorial

recursion

Take the factorial of any given number

FizzBuzz

conditionals

Implement the FizzBuzz interview question

From Infinite Sequences to Finite Lists

higher-order functions

Convert infinite sequences back to lists using 'take' and 'collect'

Greet

Can you make a custom block that greets someone?

Intro to Infinite Sequences

higher-order functions

Represent a counter over all the counting numbers using higher-order functions

Isogram

conditionals
lists
keep

Can you detect first, second, and third order isograms?

Leap Year

Given a year, determine if it is a leap year

Luhn Formula

lists

Implement Luhn formula, a checksum used to check validity of a variety of numbers including credit card numbers and Canadian Social Insurance Numbers

Mapping Over Infinite Sequences

higher-order functions

Implement map over an infinite sequence (from 'Intro to Infinite Sequences')

Minesweeper

loops
keep
lists

Add the numbers to a minesweeper board (knowing the mine locations)

Moving Average

loops

Return a list of the averages for every N consecutive numbers in a given list

Pangram

loops
lists

Check if a phrase contains all the letters of the alphabet

Sieve of Eratosthenes

loops
lists

Implement the Sieve of Eratosthenes algorithm for finding prime numbers

Sliding Windows

loops

Given a list and window size, return a list of all windows of the given size from the list.

Transposing Music

music

Can you transpose musical notes?

Vigenere Cipher

loops
lists

Implement the Vigenere cipher, an extension of the Caesar cipher