Python3.codes

A Quick Introduction to Python 3 Programming

23rd June 2015

This Quick Introduction to Python 3 aims to teach you just enough Python, so that you can get started in computer programming, and try out some of the example codes on this site! First, you’ll want to install Python 3 or you can use the in-browser Trinket near the bottom of the page – just edit […]

Python dictionary

A Python Dictionary

26th May 2015

This is simply a dictionary of Python keywords, implemented as – of course – a Python dictionary! Dictionaries are key:value pairs. The value can be any object, such as a tuple of strings. The first item in the tuple is part of the URL to documentation at Python.org, and the second item is a brief […]

Jengod at the English language Wikipedia [CC BY 2.5 (http://creativecommons.org/licenses/by/2.5), GFDL (www.gnu.org/copyleft/fdl.html) or CC-BY-SA-3.0 (http://creativecommons.org/licenses/by-sa/3.0/)], via Wikimedia Commons

Compute Average Heights

3rd May 2015

This is a simple program to compute average heights. In a loop, it prompts the user for heights, inputs a text string and converts it to a ‘real’ number, sums them, and divides by the number of heights. Exit is signalled by negative height, after which the sum of the numbers is divided by the number of […]

Turtle Star

18th April 2015

A very simple Turtle program. Turtle can draw intricate shapes using programs that repeat simple moves. Turtle graphics is a popular way for introducing programming to kids. It was part of the original Logo programming language developed by Wally Feurzig and Seymour Papert in 1966. Imagine a robotic turtle starting at (0, 0) in the […]

Square Spiral

18th April 2015

This is a very simple introduction to Turtle graphics. The turtle starts in the middle of the window, moves forward a small distance, turns right, moves forward a slightly longer distance, right again, even further this time… until the distance equals or exceeds a given limit. Turtle graphics is a popular way for introducing programming […]