Skip to main content
Practice

Coding Quiz

The first coding quiz is to write a function that outputs five times the given number.

It is a simple program that takes a single integer input from the user, calculates five times that integer, and outputs the result.

Coding quizzes require you to write only the function that meets the given conditions, rather than the whole code.

As explained in the orientation, you only need to implement the input and output of the function defined as def solution. πŸ‘

Output Five Times the Given Number
def solution(number):
return # Write your code here

Hints​

  • def is the keyword for defining a function, which is a block of code that performs a specific task.

  • return is the keyword used to return the result of a function. The value that follows return is given as the result of the function.

  • To return five times the given number (number), you need to write number multiplied by 5 after return. In Python, multiplication is performed using the * operator.

Based on what you've learned so far, write a function that outputs five times the input number and check if it passes the test.

You can also view an example answer by clicking the Example Solution button at the bottom right.




Input and Output Example​

  • Input: 16

  • Output: 80

  • Input: 3

  • Output: 15