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
aivan3 [116]
3 years ago
10

Consider the following code: x=9 y = -2 z=2 print (x + y * z) What is output?

Computers and Technology
1 answer:
Goryan [66]3 years ago
3 0

Answer:

14

Explanation: The reason why is because adding a negative is pretty much subtracting by 2. 9-2=7. Then multiply 7 by 2 like add 7 to 7 and you get 14.

You might be interested in
What is hardware?
Dennis_Churaev [7]
The physical devices that make up a computer system
7 0
3 years ago
Read 2 more answers
Give a big-O estimate for the number additions used in this segment of an algorithm.
rjkz [21]
Big-O notation is a way to describe a function that represents the n amount of times a program/function needs to be executed. 

(I'm assuming that := is a typo and you mean just =, by the way) 

In your case, you have two loops, nested within each other, and both loop to n (inclusive, meaning, that you loop for when i or j is equal to n), and both loops iterate by 1 each loop.

This means that both loops will therefore execute an n amount of times. Now, if the loops were NOT nested, our big-O would be O(2n), because 2 loops would run an n amount of times.

HOWEVER, since the j-loop is nested within i-loop, the j-loop executes every time the i-loop <span>ITERATES. 
</span>
As previously mentioned, for every i-loop, there would be an n amount of executions. So if the i-loop is called an n amount of times by the j loop (which executes n times), the big-O notation would be O(n*n), or O(n^2). 

(tl;dr) In basic, it is O(n^2) because the loops are nested, meaning that the i-loop would be called n times, and for each iteration, it would call the j-loop n times, resulting in n*n runs.

A way to verify this is to write and test program the above. I sometimes find it easier to wrap my head around concepts after testing them myself.
3 0
3 years ago
Coefficient of x in expansion (x+3)(x-1)<br>​
neonofarm [45]

Answer:

the coefficient of x here is 4

Explanation:

pls let me know if its wrong or right ..i"ll try another way than:?

5 0
3 years ago
Read 2 more answers
Which of the following is NOT a way to build on your strengths?
N76 [4]

Answer: the answer is B

Explanation: You can't raise your strengths if you only do sports you are good at:)

8 0
3 years ago
Read 2 more answers
How do we distinguish between remote and local information sources? give an example of each source? i'll give brainliest answer
kirill [66]

A local server means that you have a server setup on your current machine. A remote server is ran on a different machine

7 0
2 years ago
Other questions:
  • Katie created a web site that automatically scales to fit a cell phone. What kind of design did Katie use?
    12·2 answers
  • True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
    10·1 answer
  • Disconnecting or making the equipment safe involves the removal of all energy sources and is known as _____________. A) Isolatio
    8·2 answers
  • What is a programming method that provides for interactive modules to a website?
    12·1 answer
  • Determine the output of the following code segment:
    9·1 answer
  • Byron wants to use Quick Parts to insert reusable content into a company Word document. Where will he access this option? Design
    11·2 answers
  • A production house needs an operating system that captures saves and generates information within a specific time. Which type of
    11·1 answer
  • Write a program that asks the user to enter two integer numbers X and Y. The program halves each number between X and Y then pri
    15·1 answer
  • Which situations are better suited to an indefinite (while) loop? Select 3 options.
    5·2 answers
  • You can use these finger motions to perform specific functions on a Mac OS system:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!