Double a Number

Beginner

Challenge Description

Let's create a magical function that doubles any number you give it! This challenge is perfect for beginners and will help you understand how functions work in Python. Keep it fun and remember, every time you give this function a number, it will return double its value!

Your task: Implement a function named double_number that takes one integer as an argument and returns double its value.

Here is what your function should look like in action:

print(double_number(2)) # Output: 4 print(double_number(10)) # Output: 20 print(double_number(7)) # Output: 14

Are you ready to double down on this challenge? Let's get started!

Geek
Inputs

Arg 1:

2
Expected Output
4
Actual Output
Double a Number [beginner] | Coding for Kids