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

Hideki tojo's Government in Japan was similar to totalitarian governments in Germany and Italy in that it
The Sixth Amendment of the U.S. Constitution guarantees the right to which of the following?
Axel follows these steps to divide 40 by 9: Start with 40. 1. Divide by 9 and write down the remainder. 2. Write a zero after the remainder. 3. Repeat steps 1
Determine the amount of work done when a crane lifts a 100-N block form 2m above the ground to 6m above the ground
please help me asap
Find the unknown angle
Which graph represents the parent function of y=(x+2)(x-2)
Florida benefited greatly from Roosevelt’s Civilian Conservation Corps (CCC) in the 1930s. Which of these was of LEAST benefit to the state? A) Workers planted
Nonverbal communication may best be defined as _____.
Find the equation of a line whose slope is 2/5 and y- intercept is 2.write your answer in the form 1) ax+by+c=02) x/a+y/b=1