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 November 21 2024 12:22 pm

attachments [paper clip]

  last modified size
TXT length.py Thu Nov 21 2024 12:22 pm 493B
TXT max.py Thu Nov 21 2024 12:22 pm 470B