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 type of logical fallacy does the following sentence show?
Choose the sentence which contains an indirect object. a. They gave me a bonus. b. I worked hard each day. c. I spent it immediately. d. It is difficult to
which is usually the best way to present or communication inferred data
which of the following has been a negative effect of industrialization in china? increased literacy rates sharp reduction in agricultural land Decreased infant
What are differences and similarities between the nervous and endocrine systems?
What is the sum of 667 and 23? A. 29 B. 690 C. 644 D. 15,341
What type of graph best shows a comparison of a part to a whole?
Organisms have the ability to regulate their internal environment in order to maintain a steady state called _____. metabolism homeostasis life
Washington's Crossing" is a story about which war?
Aristotle's theory of a person's "function" said that: