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 Wed July 3 2024 5:46 am

attachments [paper clip]

  last modified size
TXT length.py Wed Jul 03 2024 05:46 am 493B
TXT max.py Wed Jul 03 2024 05:46 am 470B