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 Thu April 25 2024 12:55 pm

attachments [paper clip]

  last modified size
TXT length.py Thu Apr 25 2024 12:55 pm 493B
TXT max.py Thu Apr 25 2024 12:55 pm 470B