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's the difference between murder and execution
Figurative language is used in poetry to a Create vivid imagery b Set the mood and tone c Deliver the theme to the reader d All of the above***** My answer
what amendment gives us protection against the national government's doings things not listed in the constitution
Which archetypal character does the speaker represent in this passage? By golly, here they go and use up all the towels, every doggone one of ''''em, and they u
I need help with this one. How did Gilgamesh change during the story? A. he learned to love his enemies B. he gave up being king in order to save Enkidu C. he f
The measure of W is 134°, the measure of Y is 46°, and the measure of Z is 134°. What is the measure of X? a 40° b 46° c 134° d 90°
Use the following quote from Adam Smith to answer the question below: "It is not from the benevolence of the butcher, the brewer, or the baker that we expect ou
By how many is 3/4 of 20 greater than 3/5 of 20
What is the source of the oxygen released into the air as a product of photosynthesis?
What did rich men wear in the 1600s?