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

Draw counters to make 10 using number 7 and 8 .
I need help writing an essay. i know what i am writing, how i am writing it, and my opinion, i just need help with the wording. can anyone help me?
What was a key reason for the growth of the maya culture??
Cedric can swim a lap in 23 and 3/5 seconds. Jason can swim a lap in21.4 seconds. How much faster can Jason swim in a lap than Cedric?
what is 14^5 divided by 14^-9 explain answer
how can you tell the difference between a male and a female fish ?
The US became involved in World War II to oppose the aggression of
Calculate the density of helium gas at 25.0â—¦c and at a pressure of 1521 mmhg. express your answer in g/l.
Which are Renaissance ideas that influenced northern European art, religion, and thought?
Factor: [tex] 25y^{2} [/tex]-20y+4