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
VladimirAG [237]
3 years ago
12

What is the final amount stored in value if the computer selects 17 as the

Computers and Technology
1 answer:
nadya68 [22]3 years ago
6 0

Answer: -17

Explanation:

Our random number is 17. Let's go through line by line.

  1. value is a random number picked which is 17
  2. valueB = 17 / 2 = 8.5
  3. If value is greater than 0 AND value has a remainder of 1, we will set the value to value* -1.
  4. Value is now 17 * -1 = -17

Let's quickly calculate value mod 2. 17 % 2 = is 1. If you're wondering how we did that, the remainder after dividing 8 into 17 twice is 1, because 17 - 16 = 1.

We stop after line 4 because we stop the conditional statement after one condition is filled.

You might be interested in
To create a cover letter to send to potenial employers alone with a resume what software program should you use
Alexus [3.1K]
Microsoft word? That’s the standard program used but I don’t know if there are special resume programs you learned about.
3 0
3 years ago
When one method calls another, which of the following statements are true?
jonny [76]

Answer:

I. The class methods and instance methods of one class may call the public class methods of another class using dot notation and referencing the name of the other class.

Explanation:

Private methods are being accessed from only within the class or scope specified. No other means of accessibility is possible, and even through inheritance. And instance methods can never call without using dot notation, any of the class method of the same class. Hence second and third options are not correct. And the class method and the instance methods of one class may call the public class methods of another class using the dot notation and referencing the name of the other class. Hence, the correct option is the first one.

3 0
3 years ago
In early Oklahoma, __________ tribes were most nomadic. A. hunting B. farming C. semi-sedentary D. agricultural Please select th
denpristay [2]

Answer:

A

Explanation:

They needed to follow the food/buffalo

5 0
2 years ago
What are some of the challenges that could arise from setting up a file management system on a computer?
emmainna [20.7K]
File management is set of methods for naming, storing and handling files. <span>A few key things that should be taken into consideration are: date, genre, occasion, and subject. After setting up a file management system on a computer the following challenges could arise: </span>standardize file naming, folder structure, metadata use and more. .
5 0
3 years ago
In computing, a ________ is named after a housing construction feature that slows the spread of fires from house to house.
professor190 [17]
It’s called a firewall! :)
3 0
3 years ago
Other questions:
  • While engineers work to create computers that can understand us emotionally, ________ are also evolving toward a more human appe
    12·1 answer
  • Which of these are examples of a Single Sign-On (SSO) service?
    5·1 answer
  • The array mycats is an 8 element array of type kitty that has already been declared and initialized. write the expression(s) in
    5·1 answer
  • In general, font size for software-generated presentation slides should be no smaller than __________ points.
    8·1 answer
  • Within the seven domains of a typical IT infrastructure, there are particular roles responsible for data handling and data quali
    10·1 answer
  • When the continue statement is encountered in a loop, all the statements in the body of the loop that appear after it are ignore
    5·1 answer
  • It is important for security practitioners to take into consideration the __________ element when devising password security pol
    15·1 answer
  • Question 1
    10·1 answer
  • What is the by stander effect
    9·1 answer
  • A type of attack where the adversary intercepts network packets, modifies them, and inserts them back into the network is called
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!