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
Likurg_2 [28]
4 years ago
14

Write a function negateOdds that takes a list of integers and returns a list of integers with all of the odd integers negated. n

egateOdds :: [Integer] -> [Integer]
example: [1,2,3,4,5] should return [-1,2,-3,4,-5]
Computers and Technology
1 answer:
aleksley [76]4 years ago
5 0

Is this computer science?

If so, then the function you would need for your code is this...

_____

if (someValue%2 != 0) {

 value *= -1;

        }

_____

//basically <u>number%2 == 0</u> means even so "!" means false so "not even" meaning "odd."

Assuming you are doing an array list (given a set value) or a for-loop with an

int someValue = Integer.parseInt(args[i]); inside (not given a set value and not restricted)

Otherwise ignore me....lol

You might be interested in
A disk rotates at a rate of 7200 revolutions per minute. Seek operations (i.e., moving the access head to a desired track) take
Leno4ka [110]

Answer:

24.167 micro seconds.

Explanation:

The given rotation rate = 7200 rpm = 7200 rounds per minute

Rotational latency is the average time taken for the head to reach starting of sector .

Rotational latency (in micro seconds) = (1 / (RPM / 60)) * 0.5 * 1000

(1/(7200/60))* 0.5 * 1000 = 4.167 ms

Thus, rotational latency = 4.167 ms.

Seek time = 20 ms

The average time taken for the access head to get to the beginning of randomly selected sector will be equal to the average time to first reach the random track plus the average time taken to reach random sector .

= 20 ms + 4.167  ms  = 24.167 micro seconds.

Thus, it would take 24.167 micro seconds to get the access head to the beginning of a randomly selected sector on a randomly selected track.

8 0
4 years ago
On the planet Sigma, robots excavate chunks of a very precious cristaline. These chunks can be divided into smaller part only on
Rainbow [258]

Answer:

Start the algorithm and check the weight of the ship. Load the crystalline to the ship. Check to see if the ship weighs ship weight + k pound crystalline, if less, add more crystalline. If excess, remove the excess crystalline, but if the weight meets the condition, then take off with the loaded ship to planet sigma.

Explanation:

The algorithm continuously checks the weight of the ship on loading with the calculated sum of the ship and k pound crystalline weight. The ship is able to load the correct maximum amount of crystalline to the planet sigma.

7 0
3 years ago
Please briefly describe your QA / testing process?
gtnhenbr [62]

Answer: The QA/Testing process consist of the following:

1. Requirement specification

2. Reviewing the code.

3. Unit testing

4. Integration test

5. Performance testing

Explanation:

We start of by the requirement specification try to gather all the information accurately. Then begins the coding process where there is review of the code so that they perform their desired purpose. After modules are completed we perform unit testing of the different modules individually and also do the integration testing once all the modules are completed. At the end we perform the performance testing to take a note on their desired output and other quality parameters.

4 0
3 years ago
PODARDSRTH?HOW SPELLING
Amiraneli [1.4K]
Sorry, I d0nt understand
8 0
3 years ago
The correct order of operations is _____. brackets, exponents, division, multiplication, addition, and subtraction subtraction,
bija089 [108]

brackets, exponents, division, multiplication, addition, and subtraction

6 0
4 years ago
Read 2 more answers
Other questions:
  • Proxy data:
    12·1 answer
  • Which osi layer is responsible for combining bits into bytes and bytes into frames?
    8·1 answer
  • How much mobile data does maps use
    6·1 answer
  • What does ACCU stand for?
    13·2 answers
  • A microphone is a type of electronic.<br><br> True/Faulse
    14·1 answer
  • What is redundancy? What problems are associated with redundancy?
    8·1 answer
  • The range A2:B4 has how many cells?   A. 2   B. 4   C. 6   D. 8
    11·2 answers
  • The ACT science test takes___minutes.<br> A. 45<br> B. 30<br> C. 35<br> D. 60
    11·2 answers
  • Two DHCP servers, Server1 and Server2, are running Windows Server 2016. As the administrator, you create a scope called Scope1.
    8·1 answer
  • A Hospital wants to store different types of data I need to find the best storage device for each type and why what is the best
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!