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

Explain how the taxes were a cause for the American Revolution. Be sure to explain why colonists felt the British did not have the right to tax them.
The largest source of household income in the U.S. is obtained from A. stock dividends B. wages and salaries C. interest earnings D. rental income
A molecule is made up of two or more chemically bonded atoms. true or false
The maintenance of equilibrium while stationary or moving is termed _____. a. balance b. coordination c. agility d. muscular strength e.poise
Cloud formation depends on?
DNA is used to make _________, and RNA is used to make __________. A) RNA, proteins B) RNA, DNA C) proteins, DNA
When would be only four different equations for a set of math mountain numbers
Read the sentence. Taking great care to select a safe nest site, alligators build large nests made of decaying plants and mud. Which type of sentence is this? c
What is characteristic of George Grenville?
Most Americans drink plenty of water. a. True b. False