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

Which characteristics of the neolithic revolution helped lead to the growth of early river valley civilizations? -the discovery of fire allowed people to cook
How does the House of Representatives determine the rules of proceedings (the ability to have debates, amendments, etc.)?
Find an equation of the line that contains the point (1,-2) and is perpendicular to the line x=3y=6
Question 4 Which of the following was an early automobile built by Henry Ford? Model-T Model-E Chevy None of the above
How can you write the expression with rationalized denominator?
How does one determine a percent composition from an empirical formula.
What is the subject of the poem A Poison Tree by William Blake
Which of these were attempts made by President Hoover to eliminate the problems created by the Great Depression?
What do you think a persuasive angle is?
how many groups of 2/3 are in 3/5