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

After the United States withdrew from Vietnam in 1973,
Which was an advantage for the Americans during the American Revolution?
Give three reasons why you think Clip Art is so widely used in many different types of documents.
Please help with these three questions. The electrons in the diagram have slowed to a stop and have just started their return to the left plate. What is the be
A statement can have which of the following truth values? Select all that apply TRUE FALSE BOTH TRUE AND FALSE NEITHER TRUE NOR FALSE
An unknown substance cannot be separated by physical processes, but can be separated by chemical decomposition. the substance must be a(n): a. compound b. ele
1. For which is a chart legend used? a. all of the time b. whenever you are comparing data that is the same c. whenever you
what is a word used as a substitute for proper or common words?
Of the 350 seniors at Westside High School, 1/25 plan to attend junior college in the fall. Which represents the part of seniors who plan to attend junior colle
someone explain thissss