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
dezoksy [38]
2 years ago
12

Define a function named signof that recieves an integer argument and returns the value 1 if the argument

Social Studies
1 answer:
arsen [322]2 years ago
7 0

The signof function of COSC can be defined as following:

def signOf(int):

>>> if int>0:

>>> >>> return 1

>>> elif int==0:

>>> >>> return 0

>>> else:

>>> >>> return -1

It receives an integer argument and returns the value 1 if the parameter is positive, 0 if parameter is 0 and -1 if the parameter is negative.

<h3>What are functions in computing?</h3>

Code units that are "self contained" and carry out a particular purpose are called functions. Typically, functions "take in," "process," and "return" data and results. Once a function has been written, it can be utilized countless times. It is possible to "call" functions from within other functions.

To know more about functions, visit:

brainly.com/question/19181382

#SPJ4

You might be interested in
Which of the following is TRUE about the Nile Delta?
boyakko [2]

Answer:

B. or C.

Explanation:

3 0
2 years ago
Read 2 more answers
Mag bigay ng isang halimbawa akda na pamagat gamit ang sulating teknikal bokasyonal ​
zysi [14]

sagot

150 muna tayo

Explanation:

kasi bakla ka

3 0
3 years ago
What is the single activity that usually requires the most time during a project?
Schach [20]

Answer:

<h3>The single activity that usually requires the most time during a project is <em><u>PROGRAMMING</u></em></h3>
7 0
2 years ago
Advantages of maps over aerials photographs as a way of understanding Earth's surface?
VARVARA [1.3K]

D,photographs do not give an accurate picture

3 0
3 years ago
Read 2 more answers
According to freud, the "third shock" to the collective human ego was the realization question 12 options:
velikii [3]
<span>According to freud, the "third shock" to the collective human ego was the realization 
Answer: That humans are not the rational commanders of their lives.</span>
8 0
4 years ago
Other questions:
  • In art, what is overlapping? a. Joining several diagonal lines moving in different directions. b. Technique used to make a form
    10·2 answers
  • Stan and Jenny are in a psychology course that requires them to repeat an experiment that researchers have conducted in the past
    15·1 answer
  • How was the united states' policy of containment related to the Marshall plan?
    5·2 answers
  • Kurt and mitch visit an amish village on a class trip. "let's see if we can round up some old radios and appliances and drop the
    13·1 answer
  • Select all that apply.
    6·2 answers
  • Why are 3rd parties important to the u.s political system? in other words, why do we have 3rd parties?
    6·1 answer
  • The "melting pot" model of immigration overly simplifies the way that migration actually took place in U. S. history for all the
    6·1 answer
  • 3. In each box write one role a monk played in medieval Europe. You must have more than
    14·1 answer
  • What’s was the main purpose of colonialism?
    12·1 answer
  • Was passage of the patriot act an appropriate response to the september 11th terror attacks? consider the arguments that george
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!