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

What is the answer to split 56 in the ratio of 3:4
Alison wants to find out how much time people spend reading books. She is going to use a questionnaire. Design a suitable question for Alison to use in her ques
What causes chemical weathering?
find the area of a triangle given that c=40m b=20m a=48°
what is the negative of -1/3 and why??
Consider the relation {(–4, 3), (–1, 0), (0, –2), (2, 1), (4, 3)}.Graph the relation.State the domain of the relation.State the range of the relation.Is
The function f(t) = −5t 2 + 20t + 60 models the approximate height of an object t seconds after it is launched. How many seconds does it take the object to hit
What is the Difference between Research and Investigation???
Ratio equal to the ratio given 12:7
What causes chemical weathering?