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

b) An earthed conductor was brought near the charged student. A spark jumped between the conductor and the student. The potential difference between the conduct
From earth why dose the sun look so much larger than other stars ? Is the sun actually larger than the stars outside our solar system ? Explain your ideals belo
Complete the sentence with a word that means the same as "rare"
Quick Math Question for 50 Points! Anybody willing to help? If so, brainliest plus huge thanks! :D Eight less than the product of three and a number is the same
1.07 x 104 -3.38 × 10³
What is this phrase in English? "Mi madre es muy inteligente."
you spent $25 at the store. you bought a book for $8.50 and pencils for $.25 each. how many pencils did you buy?
The sum of 2.236 and 7.555.. must be : A) Rational B) Irrational C) An integer D) A whole number
From earth why dose the sun look so much larger than other stars ? Is the sun actually larger than the stars outside our solar system ? Explain your ideals belo
Suppose D(T) = A(T-H)2 +K represents the hieght of an object in feet after T seconds. Suppose an object has a maximum height of 12 feet after 2 seconds. This sa