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

PLEASE HELP ME ANSWER THIS!!!!!!!!!!!!!!!!!!!!! 75 points!!!!!!!!!11
Categorize the locations based on whether they were sites of allied or Japanese victories
Your class hopes to collect at least 325 cans of food for the annual food drive. There were 132 cans donated the first week and 146 more the second week. a. Wri
what was the gaspee?
What was the name of the communist party who took power in november 1917?
pick one type of cancer. Describe the system(s) it affects, and what medications are used to treat it.
If two sides of a triangle measure 12 and 7, which cannot be the perimeter of the triangle? a. 29 c. 34 b. 37 d. 38
If the coordinates of a point have the same sign which quadrant(s) could the point be in
what is the algebraic equation the difference between a number and 11 is 3 more than half the number
If the variety of species in an ecosystem decreases this is a decrease in the system's ________ apex