American Young Coder

AYC logo
Loading Events

« All Events

  • This event has passed.

7 PM – Intro to Competitive Programming – Darin

June 24 @ 7:00 pm - 8:00 pm

What We Did Today:

  1. Reviewed the speed limit problem
  2. Learnt about recursion

Homework:

Submit into the google drive here when you are finished!

  1. Create a recursive function for the factorial.
    If your input is 3, then factorial(3) should give you 3*2*1 = 6
    If your input if 5, then factorial(5) should give you 5*4*3*2*1 = 120

    Resources to reference:
    https://www.w3schools.com/java/java_recursion.asp
    https://jasondeden.medium.com/recursive-functions-in-python-a-visual-walk-through-28cf22cc10e2

    or if you prefer video format:
    https://www.youtube.com/watch?v=k-7jJP7QFEM

    HINTS: When doing the recursive call, think about what the recursive input should be (is it the same input number or something different?)

Notes:

You can reach out to me at ddjapri@ayclogic.com if you have any questions!

You can find class notes here.

Details

Date:
June 24
Time:
7:00 pm - 8:00 pm
Event Categories:
,