Section 1 - Instruction

We've covered a lot about functions - creating them, using parameters, returning values, defaults, and scope. Now let's put it all together by building useful functions from scratch!

Engagement Message

Ready to become a function-building expert?

Section 2 - Instruction

Let's design a function step-by-step. We want to calculate the final grade for a student. What information do we need? A slice of scores and maybe different weights for assignments.

Engagement Message

What would you name this function?

Section 3 - Instruction

Here's our plan: take scores and weights, calculate weighted average, then return a letter grade. Notice how we're breaking this complex task into smaller, manageable steps within one function.

Engagement Message

Can you see the logical flow?

Section 4 - Instruction

Let's implement it! We'll multiply each score by its weight, sum everything up, then convert the average to a letter grade:

Engagement Message

Why do we divide the total by the sum of the weights?

Section 5 - Practice

Type

Fill In The Blanks

Markdown With Blanks

Complete this function that calculates the area of a rectangle with optional padding:

Sign up
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal