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

One large box of birdseed can feed half a dozen parrots for 15 days. For how many days can this same large box of birdseed feed 5 parrots.
which sentence contains a mixed compound subject? A) All of the toys were scattered across the floor. B) Leticia and her cousins spent the day at the lake. C) A
Which revision best corrects the errors in the given sentence? Our relatives often delayed by traffic usually come in the late afternoon. A. Our relatives (of
The phase of a sample of a molecular substance at STP is not determined by its (1) arrangement of molecules(2) intermolecular forces(3) number of molecules(4)
How to calculate PI number?
Which atmospheric gas has the greatest effect on the weather conditions associated with an air mass?
Andy solves problems 74 to 125 inclusive in a Math exercise. How many problems does he solve? a. 53 b. 52 c. 51 d. 50 e. 49
Why did American Indians occupy Alcatraz Island in 1969?
what is an equivalent decimal to 9/15
Which organisms are the oldest to most recent, based on scientific views? A. cyanobacteria, birds, sea scorpion, saber-toothed cats B. birds, saber-toothed cats