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

In "i too" why does the speaker say "they" will be ashamed
What is 0.05 10 times as much as
9/10 times a number plus 6 is 51
expand and simplify(3x+2)^2-(2x-1)^2
A key message of “Frederick Douglass” is all human beings have a deep need for: A. love. B. logic. C. instinct. D. freedom.
Which of the following is not a function of protein? A. Helping cells communicate B. Serving as enzymes C. Insulating the body D. Giving cells structure
Which process could a forensic scientist use to analyze a DNA sample from a crime scene to identify a criminal?
how does the nucleus of a copper atom compare to the nucleus of a nickel atom
Cubing lets you _____ by helping to identify six perspectives or aspects of your topic.
Two different ways to find the difference for 12-3