Intro to
Programming
(with Python)

Fall 2019
course
site

Tue Nov 26

Aside ...the perils of object oriented coding

in class

I've attached the programs we did in class, length.py and max.py. I also showed a towers of hanoi program.

recursion

Definition: recursion.
See "recursion".

Discussion topics :

Code examples :

Just for fun :

This site isn't python, but is a nice collection of images defined with recursion. Something along these lines could be accomplished with Zelle's graphic library as a possible final project.

Recursion Class Exercise :

Write a recursive function that finds the maximum value of a list.
The idea is to think of a list recursively as 
  (list) = (first_element, list)
and so max(list) = max( first_element, max(list) )
What is the stopping condition ?
https://cs.marlboro.college /cours /fall2019 /python /notes /recursion
last modified Sun December 22 2024 8:56 am

attachments [paper clip]

  last modified size
TXT length.py Sun Dec 22 2024 08:56 am 493B
TXT max.py Sun Dec 22 2024 08:56 am 470B