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

1,000 pounds > < = 1 ton
What is the least common multiple of 8 and 14
If two organisms are in the same phylum, then which of these statements is correct?
what is defined as generating ideas by writing down everything that comes to mind on a subject. A. Mindfulness B. Reviewing C. Brainstorming D. Re
As the costs for the war in Iraq increased,
Which transformations are needed to change the parent cosine function to y= 3cos(10(x-pi) )?
If triangle MNO is congruent to triangle PQR, which statement is not true? segment MN ≅ segment QP ^ would this be the untrue statement? ∠N ≅ ∠Q segment NO ≅
What literary movement paralleled impressionistic art and music? expressionism chromaticism symbolism primitivism
If the theoretical yeild for a reaction is 156 grams and you actually made 122 grams of the product, what is your percentage yeild
Two cell phone companies have different rate plans. Runfast has monthly charges $25 plus $10 per gig of data. B A &D’s monthly charge is $18 plus 15 per gig