The problem does not ask students to distinguish between
programmer chosen names and keywords, so there may be some variation in approach.
In this solution, "Regular" identifiers are in red, keyword identifiers in
green, and expressions are underlined.
# File: chaos.py (comment)
# A simple program illustrating chaotic behavior. (comment)
def main(): #(function definition)
print "This program illustrates a chaotic function" #(output)
x = input("Enter a number between 0 and 1: ") #(input)
for i in range(10): #(for loop)
x = 3.9 * x * (1 - x) #(assignment)
print x #(output)
main()