Utilising Azure Notebooks for learning new programming languages (like Python)

Published Mar 21 2019 07:27 AM 191 Views
First published on MSDN on Oct 12, 2017

Guest post by Sidak Pasricha Microsoft Student Partner at UCL

About Me

Hello! My name is Sidak and I’m pursuing Computer Science Engineering at UCL. My interest areas mainly include Artificial Intelligence, Robotics and Video Game Development but I am open to any other technologies as I enjoy learning new skills and languages. One of my many ambitions is to successfully create video games that incorporate AI to provide a richer user experience and involvement.

My LinkedIn profile can be found at: https://www.linkedin.com/in/sidak-pasricha/

Learning a new programming language:

How does one learn a new programming language? Is it by spending hours reading and highlighting textbook pages, looking up video tutorials or by frying our devices with multiple windows and browser tabs full of code? I try to learn a new language by doing all of the above at the same time (yes, my mom gave up on organizing my desk a long time ago). I always wished there was some way of saving my head from all that unnecessary movement from book to screen to… you get the point. This is where Azure notebooks comes in. Imagine an interactive book on your screen that has text, videos, graphics and allows you to type and run code. Isn’t that synonymous for convenience?

What are Azure Notebooks?

Azure Notebooks is a free service from Microsoft which allows interactive teaching/learning by incorporating Jupyter Notebooks software. This allows the creation of interactive documents by using a cell-based system where there are different types of cells – each with their own properties, like code cells that allow the execution of the typed code, showing the results at the footer of the cell (Click here for a demo) . Currently there is support for F#, Python (py2, py3, py3.6) and R programming languages. One noteworthy feature is that its all browser based - there is no need for downloading any prerequisites on your device.

Click here to get started with Azure Notebooks. Simply log-in and start learning or teaching from the 21 st century notebook.

Quick Fact: If you download a notebook file and try to open it on your browser it will show you a JSON file, showing the functionality of Notebooks as each cell is segregated in the hierarchy and its formatting properties are visible. If you see symbols like “*” or “#” next to the text, don’t worry - Notebooks use these symbols to specify formatting styles. “#” denotes Header 1 style, “##” denotes Header 2 style etc.

Learning Python with Azure Notebooks:

Once logged in, click “View All” next to the “Libraries” heading to see a page similar to this:

Image 1: The Libraries Page

This is where your libraries will be stored (Don’t worry if you have no libraries yet). For this guide, we have been provided with a basic Python Course available here . It should open a page that looks similar to this:

Image 2: The Python Course Library

Make sure you clone the library into your own account. To do this, click the “Clone” button next to the “Share” button and give it the appropriate Library name and URL. You can also choose to make it public or private as per your discretion. Click “Clone” once done and wait for a bit. Your new Library will automatically open and now you can go ahead with learning Python by clicking through the files one by one.

Since the files help you get familiar with the Notebooks too, I didn’t feel for the need of an advanced tutorial on how to proceed with Notebooks. In programming, getting in there and practicing is proven to be the best approach.

Why Python?

1. Beginner Friendly – I know a bit of java and know enough python to compare to java with. Looking back at how frustrating it was till I got into the habit of adding a “;” (semi-colon) at the end of every statement or miss a bracket and freak out during compilation, python offers a much easier and manageable syntax (way of writing code) which is complimented by its similarity with the English language.



To output “Hello World”

System.out.print(“Hello World);

print(“Hello World”)

To define a new method/ function.

This outputs “Hello World when called”

public void function(){

System.out.print(“Hello World);


def function:

print(“Hello World”);

Table 1: Difference between Java and Python. Clearly Python is much simpler and therefore, faster

2. Fastest Growing Programming Language – According to StackOverflow, the most renown forum for programming discussion, Python is the fastest growing programming language as can be seen from the graph below. This is mainly due to its varied applications ranging from web development to artificial intelligence to scientific modelling to game development.

Image 3: Python's increasing growth and popularity (Courtesy of Stack Overflow)

3. Used to create revolutionary software – Due to the fact that Python is a frequently updated open-source language, there are a lot of code libraries with convenient functions that can facilitate the creation of imaginative ideas. Many popular frameworks are Python-based too.

Why Azure Notebooks?

1. Flexibility to Learn how you want – Whether you’re the video person, the book person or the multiple windows person. You can feel comfortable instantly with the way it facilitates learning (do a bit of the course above and you’ll agree). Since programming is all about practice, the fact that there are spaces to write and execute codes without even needing to download large, complex IDEs is the cherry on top. This also helps you focus on one place, definitely good for studying effectively. I’ve tried doing video-based courses while I had multiple windows open to practice on and a supplementary book and I definitely learnt more through notebooks in much less time.

2. Cross Platform Compatibility – Your entire workspace in one window on your beloved smartphone or tablet? Its possible. As no downloads are needed, you can practically run it on any platform – I used to conveniently continue learning on the way to my university. Learning is best done uninterrupted.

Image 4: Using Azure Notebooks on my Android Phone

3. There is an abundance of tutorials made for Jupyter Notebooks on the web for various courses like Data Science.

4. It offers a terminal which adds to the flexibility factor in case there is a need to import external packages using pip or you can install these directly within the Notebook using !Pip see https://blogs.msdn.microsoft.com/uk_faculty_connection/2017/09/20/installing-python-packages-t... . This is barely needed as most packages are already included within the Azure platform.

5. The notebook can be exported into various formats like PDF or HTML that can be embedded in websites, increasing their portability. Or simply cloned directly from Notebooks,azure.com this also allows simpler circulation and submission of homework.

6. On the fly debugging - While coding software, I can run the code and realise it has major errors. Since you can run one cell at a time in Notebooks and variable values are retained through cells, one can detect errors in less time with definitely lower amounts of frustration by making the program in parts with clearer segregation than line breaks.

7. Its FREE! and preconfigured and managed so I do not need to worry about setting anything up


Azure Notebooks https://notebooks.azure.com/

Getting Started with Python Notebooks https://notebooks.azure.com/eric/libraries/DEV236x

Python for Data Science Notebooks https://notebooks.azure.com/rheartpython/libraries/PythonDS101

Python Data Science Handbook https://notebooks.azure.com/jakevdp/libraries/PythonDataScienceHandbook

Version history
Last update:
‎Mar 21 2019 07:27 AM
Updated by: