1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
telo118 [61]
3 years ago
9

The following statement calls a function named half, which returns a value that is half that of the argument. (Assume the number

variable references a float value.) Write code for the function.
Computers and Technology
1 answer:
solniwko [45]3 years ago
4 0

Answer:

The function definition to this question can be given as:

def half (number): #defining a function half and pass a variable number in function parameter

   return number/2 #returns value.

data=half(12)  #defining variable data that holds function return value

print(data) #print value.

Output:

6.0

Explanation:

In the above python program, a function that is half is declare that includes a variable number in the function parameter. Inside the function, the parameter value that is number is divided by 2 and returns its value. In calling time a data variable is defined that holds the function half() value.

In calling time function holds value that is "12" in its parameter and return a value that is "6.0".

You might be interested in
Write an expression that executes the loop while the user enters a number greater than or equal to 0.
LekaFEV [45]

Answer:

while (userNum >=0) {...}

Explanation:

In a <u>while loop</u>, <u>the loop is executed until the condition is false</u>.

Since the loop will execute while the user enters a number greater than or equal to 0 (and that number is declared as <em>userNum</em>), we need to check if <em>userNum</em> is greater than or equal to 0.

4 0
3 years ago
Meaning of 'WSAD" iiiiii
Anit [1.1K]

Answer:

Websphere Studio Application Developer

7 0
3 years ago
Read 2 more answers
which is the quickest way to change the font color in multiple, randomly located cells in a worksheet?
insens350 [35]
First select or highlight the rows or columns that you want to change the font color<span>. You can hold the ctrl key while select </span>multiple cells<span>. After, selecting you can now </span>change the font color<span> of everything you selected.</span>
6 0
3 years ago
Read 2 more answers
How fast is light? person that answers this will get points ​
Serhud [2]

299,792,458 metres per second

6 0
3 years ago
Bluetooth is a common wireless protocol used to make pan connections. <br> a. True <br> b. False
Minchanka [31]
 a. True  This  is because it covers only a short distance  and allows  sharing of data between short distances(PAN) 
5 0
4 years ago
Other questions:
  • How to you put a color into a cell? <br> a.Shading<br><br> b.Fill<br><br> c.Color<br><br> d.Insert
    8·1 answer
  • Is 5g harmful to the body ?
    9·2 answers
  • The small company where you work needs to implement a second server for its accounting system, but does not have the funds to pu
    11·1 answer
  • Having data in a column formatted differently based on value is known as
    7·1 answer
  • quiz Flavio visits a local coffee shop on his way to school and accesses its free Wi-Fi. When he first connects, a screen appear
    7·1 answer
  • Inserting and deleting text is a basic editing task in word processing.<br><br> True or false
    6·2 answers
  • What is the main difference between a peripheral device and other types of devices? Choose the best answer.
    12·1 answer
  • During the preventive maintenance phase of a project involving a hydraulic power system, an engineer must change a gasket on a p
    14·1 answer
  • 1)What is the hydropower resources/energy?
    7·1 answer
  • Name and define (or list the set that defines) three of the four common data types in programming
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!