bone8765 bone8765
  • 03-06-2021
  • Computers and Technology
contestada

Write a function definition for a function which takes one parameter and returns twice that parameter

Respuesta :

MrRoyal
MrRoyal MrRoyal
  • 03-06-2021

Answer:

The function in python is as follows:

def twice(num):

   return 2 * num

Explanation:

This defines the function; The function receives num as its parameter

def twice(num):

This returns twice of num

   return 2 * num

Answer Link

Otras preguntas

divide 360 in the ratio of 1:4
according to the declaration of independence, the people have the right to alter or abolish a government if that government?
Matter is made up of very small particles called
What is the absolute value of 39
who created utopainism
which of the following is a viewpoint espoused by Locke?a)the idea that government was instated to preserve life, liberty, and property.b)the idea that governme
The relationship between the number of $4 lunches you buy with a $100 school lunch card and the money remaining on the card
is powdered drink and water a mixture or a solution
How do you add and subtract integers
What's tallest mountain in Montana