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

Read the outline. A._______ Martin Luther King, Jr. fought for a cause greater than himself. Martin Luther King, Jr. was brave. Martin Luther King, Jr. led a pe
Procrastinators can develop feelings of __________.
I have to write a skit about a popular girl and a nerd (Pantomime only) I need to establish a relationship, location and I need a conflict and a climax with a s
the battle of new orleans brought fame to which leader?
what item was left out of the repeal of the Townshend acts
Anthony was asked to give the coordinates of a point located in quadrant III. He gave the order pair (4,-10). Which statement best describes the error that Anth
.84 is 10 times as much as
How do you answer rhis
tina needs batteries. aa batteries cost $3 per pack. d batteries cost $4 per pacl. if she has $26 to spend and buys 3 times as many packs of aa batteries as d b
0.07131 to 2 decimal places