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

A mountain climber camped at an elevation of 18,492 feet. the following day the climber descended 2,516 feet to another campsite. Type a numerical expression
Is there DNA in our food? How do you know?
If five slices of pizza cost $5.50, how much do two slices cost? Ten slices? Half a slice ?
what evidence shows that sumerians where not prehistoric
On a TI-84, how do you stop it from giving you simply a number for an answer when you put in a polynomial divided by another polynomial?
I need help writing a 5 paragraph persuasive essay. The topic is: Agree/Disagree, stories with Suprise endings using situational irony is the best. I agree, but
what is the proper or common noun in this sentence?The picture below is of the snow Festival in Sapporo.
what is the proper or common noun in this sentence?The picture below is of the snow Festival in Sapporo.
what is 15.70796327 rounded to 1 decimal point?
how must a projectile be launched in order to maximize its range?