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

Ruth's class collected 7 pounds of food for the food drive. Sasha's class collected 8 1/3 times as much food as Ruth's class. How many pounds of food did Sasha'
What was buddhas given name? Please answer quick A. Deepak Chopra B. Siddhartha guatama C. Hammurabi D. Qin SHi Huangdi
How were pyramids built? How did they build it?
How many Americans were on the May 1st voyage??
The culture of Libya and the Maghreb is a blend of _____, European, and Asian influences. A. Egyptian B. Tuareg C. Berber D. African Answer might be "D." (Afric
what is the slope of y=-4x+8
Which of the following were the social and cultural purposes of Greek drama
Charlemagne was known as the "father of Europe.” How does this map help to explain that title? It shows that Charlemagne united eastern and western Europe. It s
what are the general functions of a mitochondria
on a distance vs. time graph, the line of an object at rest is a a. curved line with a slope of zero b. flat line with a slope of zero c. jagged line with a