Section 1. Chapter 5
single
Challenge: Working with Numbers
Swipe to show menu
Task
Swipe to start coding
Imagine a situation where a store launches a promotion: when purchasing 5 items at $17 each, the 6th item is free.
A total of 27 people participated in the promotion.
Calculate the total revenue from this promotion using multiplication.
Note
This task (and the next ones) use a small helper function to check your answer automatically.
- You don't need to understand
functionorreturnyet — you will learn both later in the course;- Focus only on this line:
return ___;Replace
___with your calculation using multiplication.For example:
return 2 * 10;Just write your final answer as a math expression after
return. The same pattern will be used in the next challenges, so no need to worry.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 5
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat