CS162 Assignment 9 - dem definitions!

CS162 Assignment 9 - dem definitions!

by Deleted user -
Number of replies: 0

I've never tried to write definitions the way this assignment is asking for, it's been a real challenge.  I feel like I understand recursion, but writing a math definition is doubly difficult.  I reread the chapter looking for examples of definitions but there wasn't much, it seemed to cover how recursion works then just assumed you already knew how to format definitions.

Anyone have tips on formatting?  For 12.2 I did something like:

x^y = x if y=1, else x^y = [the recursive formula]

But I'm not sure if that's how a definition should be written.  I'm using the definition on page 586 as an example.  I can write this as a recursive function, I have that part down.  But I'm not sure how to write it as a definition.