Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Exercism

Julia

via Exercism

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it

The creators of Julia want to eat their cake and have it too. As they describe in their blog post "Why We Created Julia" they want the speed of C, the dynamism of Ruby, the familiar mathematical notation of Matlab. They want it to be their favourite things from their favourite languages. String processing like Perl. Glue like the shell. Powerful but not impenetrably complex.

Julia has a powerful, yet clear and intuitive, dynamic type system. It allows writing dynamic code and specifying types if additional expressiveness is needed for simplification or performance increases. The language features multiple dispatch, meaning it chooses which method is called based on the types of each argument. This lets you write specific methods for certain types while providing generic fallbacks and is particularly useful for mathematical code, where it is not clear why an operation should belong to a specific argument.

Metaprogramming is easy in Julia. Code can be represented as a data structure in Julia itself, so a program can transform and generate its own code, similarly to Lisp. Large parts of Julia's base and standard library are also written in Julia. Understanding and changing it does not require knowledge of another language. If a library you need to use is written in another language, such as C, Fortran or Python, you can use simple interfaces to call them directly from your code.

Despite its young age, Julia is already being used in the real world in a variety of fields, such as but not limited to Finance, Data Science and Scientific Computing. You can find many showcase applications on the Julia Blog Aggregator, case studies from commercial use on juliacomputing.com, and a list of publications about the language and its applications in research here.

Syllabus

  • Hello World
    • Exercism's classic introductory exercise. Just say "Hello, World!".
  • Lasagna
    • Learn the basics of functions in Julia by cooking delicious lasagna.
  • Annalyns Infiltration
    • Learn about boolean expressions by implementing the quest logic for a new RPG.
  • Squeaky Clean
    • Learn about characters by cleaning strings.
  • Chessboard
    • Learn about ranges by building a chessboard.
  • Mixed Juices
    • Help Li Mei operate her juice store with loops
  • Currency Exchange
    • Learn about numbers by solving Chandler's currency exchange conundrums.
  • Elyses Enchantments
    • Help Elyse with her Enchantments and learn about vectors in the process.
  • Cars Assemble
    • Learn about conditionals by analyzing the production of an assembly line.
  • Secrets
    • Learn about bit manipulation by writing a program to decrypt a message.
  • Tisbury Treasure Hunt
    • Learn about tuples by helping out competitors in the Tisbury Treasure Hunt.
  • Inventory Management
    • Learn about Dicts by managing warehouse inventory.
  • Locomotive Engineer
    • Learn more about functions in Julia while helping Linus with his train control system.
  • High School Sweetheart
    • Learn about function composition by helping high school sweethearts profess their love on social media via unicode art.
  • Bird Watcher
    • Learn about Julia vector operations by keeping track of how many birds visit your garden.
  • Log Levels
    • Learn basic string manipulation in Julia by processing a log file.
  • Cater Waiter
    • Learn about sets by managing the menus and ingredients for your catering company's event.
  • Tracking Turntable
    • Learn about complex numbers with rotations on a special record player
  • Name Badges
    • Handle missing values in employee name badges.
  • Captains Log
    • Help Mary with her role playing game by generating suitable random data.
  • Grading Guru
    • Learn about types by doing a bit of data engineering
  • Land Grab In Space
    • Learn about composite types by improving the performance of a land claim system.
  • Treasure Chest
    • Learn how to create and use Julia parametric types by creating a Treasure Chest
  • Encounters
    • Learn about multiple dispatch by simulating encounters between pets and other entities.
  • Role Playing Game
    • Use type unions and practice composite types designing a role playing game.
  • Factory Sensors
    • Learn how to handle errors by creating a piece of software for a newspaper factory.
  • Problematic Probabilities
    • Help make statistics more accurate with rational numbers
  • Booking Up For Beauty
    • Learn about date/time manipulation by handling beauty salon appointments.
  • Regular Chatbot
    • Learn the basics of regular expressions with Julia by helping a chatbot understand humans.
  • Boutique Suggestions
    • Learn about comprehensions by generating outfit suggestions for the clients of your fashion boutique.
  • Exercism Matrix
    • Learn about multi-dimensional arrays with the Exercism logo.
  • Cheese Club
    • Use higher order functions to wrangle some data for a cheese club
  • Mecha Munch Management
    • Learn about dictionary methods by building a shopping cart MVP for the Mecha Munch grocery app.
  • Ordering Ordeal
    • Learn about sorting functions by helping a factory schedule production
  • Fibonacci Iterator
    • Learn about the iteration protocol by implementing a Fibonacci Iterator.
  • Leap
    • Determine whether a given year is a leap year.
  • Nucleotide Count
    • Given a DNA string, compute how many times each nucleotide occurs in the string.
  • Pangram
    • Determine if a sentence is a pangram.
  • Difference of Squares
    • Find the difference between the square of the sum and the sum of the squares of the first N natural numbers.
  • Raindrops
    • Convert a number into its corresponding raindrop sounds - Pling, Plang and Plong.
  • Darts
    • Calculate the points scored in a single toss of a Darts game.
  • Hamming
    • Calculate the Hamming distance between two DNA strands.
  • RNA Transcription
    • Given a DNA strand, return its RNA complement.
  • Run-Length Encoding
    • Implement run-length encoding and decoding.
  • Scrabble Score
    • Given a word, compute the Scrabble score for that word.
  • Word Count
    • Given a phrase, count the occurrences of each word in that phrase.
  • Allergies
    • Given a person's allergy score, determine whether or not they're allergic to a given item, and their full list of allergies.
  • Isogram
    • Determine if a word or phrase is an isogram.
  • Atbash Cipher
    • Create an implementation of the Atbash cipher, an ancient encryption system created in the Middle East.
  • Grains
    • Calculate the number of grains of wheat on a chessboard given that the number on each square doubles.
  • Pascal's Triangle
    • Compute Pascal's triangle up to a given number of rows.
  • Luhn
    • Given a number determine whether or not it is valid per the Luhn formula.
  • Roman Numerals
    • Convert modern Arabic numbers into Roman numerals.
  • Acronym
    • Convert a long phrase to its acronym.
  • Armstrong Numbers
    • Determine if a number is an Armstrong number.
  • Gigasecond
    • Given a moment, determine the moment that would be after a gigasecond has passed.
  • Phone Number
    • Clean up user-entered phone numbers so that they can be sent SMS messages.
  • Prime Factors
    • Compute the prime factors of a given natural number.
  • Triangle
    • Determine if a triangle is equilateral, isosceles, or scalene.
  • Sum of Multiples
    • Given a number, find the sum of all the multiples of particular numbers up to but not including that number.
  • Resistor Color
    • Convert a resistor band's color to its numeric representation.
  • Eliud's Eggs
    • Help Eliud count the number of eggs in her chicken coop by counting the number of 1 bits in a binary representation.
  • Two-Fer
    • Create a sentence of the form "One for X, one for me.".
  • Pig Latin
    • Implement a program that translates from English to Pig Latin.
  • Rotational Cipher
    • Create an implementation of the rotational cipher, also sometimes called the Caesar cipher.
  • Secret Handshake
    • Given a decimal number, convert it to the appropriate sequence of events for a secret handshake.
  • ETL
    • Change the data format for scoring a game to more easily add other languages.
  • Anagram
    • Given a word and a list of possible anagrams, select the correct sublist.
  • Flower Field
    • Mark all the flowers in a garden.
  • Collatz Conjecture
    • Calculate the number of steps to reach 1 using the Collatz conjecture.
  • Sieve
    • Use the Sieve of Eratosthenes to find all the primes from 2 up to a given number.
  • Strain
    • Implement the `keep` and `discard` operation on collections.
  • Protein Translation
    • Translate RNA sequences into proteins.
  • Proverb
    • For want of a horseshoe nail, a kingdom was lost, or so the saying goes. Output the full text of this proverbial rhyme.
  • Bob
    • Bob is a lackadaisical teenager. In conversation, his responses are very limited.
  • Resistor Color Duo
    • Convert color codes, as used on resistors, to a numeric value.
  • Resistor Color Trio
    • Convert color codes, as used on resistors, to a human-readable label.
  • Square Root
    • Given a natural radicand, return its square root.
  • Space Age
    • Given an age in seconds, calculate how old someone is in terms of a given planet's solar years.
  • Matrix
    • Given a string representing a matrix of numbers, return the rows and columns of that matrix.
  • Queen Attack
    • Given the position of two queens on a chess board, indicate whether or not they are positioned so that they can attack each other.
  • Reverse String
    • Reverse a given string.
  • Binary Search
    • Implement a binary search algorithm.
  • Yacht
    • Score a single throw of dice in the game Yacht.
  • Perfect Numbers
    • Determine if a number is perfect, abundant, or deficient based on Nicomachus' (60 - 120 CE) classification scheme for positive integers.
  • Spiral Matrix
    • Given the size, return a square matrix of numbers in spiral order.
  • Conway's Game of Life
    • Implement Conway's Game of Life.
  • Wordy
    • Parse and evaluate simple math word problems returning the answer as an integer.
  • Grade School
    • Given students' names along with the grade that they are in, create a roster for the school.
  • Diamond
    • Given a letter, print a diamond starting with 'A' with the supplied letter at the widest point.
  • Kindergarten Garden
    • Given a diagram, determine which plants each child in the kindergarten class is responsible for.
  • Nth Prime
    • Given a number n, determine what the nth prime is.
  • All Your Base
    • Convert a number, represented as a sequence of digits in one base, to any other base.
  • Largest Series Product
    • Given a string of digits, calculate the largest product for a contiguous substring of digits of length n.
  • Saddle Points
    • Detect saddle points in a matrix.
  • Meetup
    • Calculate the date of meetups.
  • Palindrome Products
    • Detect palindrome products in a given range.
  • Food Chain
    • Generate the lyrics of the song 'I Know an Old Lady Who Swallowed a Fly'.
  • Swift Scheduling
    • Convert delivery date descriptions to actual delivery dates.
  • Killer Sudoku Helper
    • Write a tool that makes it easier to solve Killer Sudokus
  • Clock
    • Implement a clock that handles times without dates.
  • Robot Name
    • Manage robot factory settings.
  • ISBN Verifier
    • Check if a given string is a valid ISBN-10 number.
  • Matching Brackets
    • Make sure the brackets and braces all match.
  • Connect
    • Compute the result for a game of Hex / Polygon.
  • Dominoes
    • Make a chain of dominoes.
  • Change
    • Correctly determine change to be given using the least number of coins.
  • Knapsack
    • Given a knapsack that can only carry a certain weight, determine which items to put in the knapsack in order to maximize their combined value.
  • State of Tic-Tac-Toe
    • Determine the game state of a match of Tic-Tac-Toe.
  • Robot Simulator
    • Write a robot simulator.
  • Binary Search Tree
    • Insert and search for numbers in a binary tree.
  • Two Bucket
    • Given two buckets of different size, demonstrate how to measure an exact number of liters.
  • FFT
    • Write a Fast Fourier Transform algorithm using complex numbers
  • Intergalactic Transmission
    • Add parity bits to a message for transmission
  • Baffling Birthdays
    • Estimate the birthday paradox's probabilities.
  • Pythagorean Triplet
    • Given an integer N, find all Pythagorean triplets for which a + b + c = N.
  • Satellite
    • Rebuild binary trees from pre-order and in-order traversals.
  • Custom Set
    • Create a custom set type.
  • Rational Numbers
    • Implement rational numbers.
  • Circular Buffer
    • A data structure that uses a single, fixed-size buffer as if it were connected end-to-end.
  • Complex Numbers
    • Implement complex numbers.
  • Alphametics
    • Given an alphametics puzzle, find the correct solution.

Reviews

Start your review of Julia

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.