Coding Quiz
The first coding quiz requires writing a function that outputs ten times the given number.
This program takes an integer input, multiplies it by ten, and returns the result.
def solution(number): return # Write your code here
Hint
-
def
is a keyword used to define a function — a block of code that performs a specific task. -
return
is a keyword that sends back the result of the function to the caller. -
To multiply the input by 10 and return the result, use the multiplication operator
*
like this: returnnumber * 10
Using what you've learned so far, write a function that takes a number, multiplies it by 10, and returns the result.
Try running your code to check if it passes the test cases.
Then, click the Solution
button at the bottom right to view the correct answer.
Input and Output Examples
-
Input:
16
-
Output:
160
-
Input:
3
-
Output:
30
Lecture
AI Tutor
Design
Upload
Notes
Favorites
Help