Simple Literate Program


Table of Contents
Introduction
Adding up the numbers
Input and Output

Introduction

This program is made to illustrate the concepts of literate programming. This program receives as input a number, and then adds up all of the numbers between one and that number, and then prints the output. The outline for the program is as follows:



Main Listing =

#!/usr/bin/python

{Import needed modules}
{Initialize variables}
{Read in a line of input}
{Add up numbers from one to the number given}
{Print results}