Mon Oct 23 10:47:34 EDT 2023

These are the simple Python programs used in class, plus a few others. If you read them and (much better) play with variations, it will help you to figure out what's going on in programming, and the two Python labs will be easier too.

These were originally written by Francisca Weirich-Freiberg '20 based on JavaScript models and subsequently fiddled by bwk, mostly to make better use of Python 3. add two numbers add two floating point numbers add up numbers until 0 computes area of circle from radius computes area of circle with function computes first name alphabetically find maximum numeric value echo a name concatenate two names computes area of ring with function computes sign of number sort a set of names computes i, i^2 in a while loop infinite loop: careful! Foxtrot for loop multiplication operation