This Quick Introduction to Python 3 aims to teach you just enough Python, so that you can get started in computer programming! First, you’ll want to install Python 3 or you can use the in-browser Trinket near the bottom of the page – just edit the code directly in there. If you have Python installed, you can…
Tag Archive for while
A Python Dictionary
Compute Average Heights
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…