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
sergey [27]
2 years ago
11

What is wrong, logically, with the following code? if (x > 10) System.out.println("Large"); else if (x > 6 && x &l

t;= 10) System.out.println("Medium"); else if (x > 3 && x <= 6) System.out.println("Small"); else System.out.println("Very small");
Computers and Technology
1 answer:
Alex73 [517]2 years ago
8 0

Answer:

The above code will hold the second condition with && operator, like "x<=6" or"x<=10" condition in the else if statement which is of no use.

Explanation:

  • The above code holds a condition-based statement by the help of if-else statement where--
  • The first if-condition will states true when the value of x will be greater than 10, So the if-else condition will be tested for that value of x which is less than or equal to 10.
  • So there is no needs to justify the " x <= 10" for else if statement and " x <= 6" for the second else if statement because the second else if statement will be tasted when the value of x will be less than or equal to 6.
You might be interested in
As important as it is to plan ahead, sometimes you_____.
timama [110]

Answer:

B. Can't stop things from doing wrong.

Explanation:

Life is never for certain there are so many unpredictable things that can happen like at one moment you are turning onto the street and you get into a car accident you didn't plan for that to happen. Anything can happen on a day to day basis that's why something can go wrong and all your plans won't work anymore.

4 0
3 years ago
Read 2 more answers
Marta is creating a program that will guide the user through a series of physical exercises. She wants the program to coach the
san4es73 [151]
She should use a condition-controlled loop. Because it uses a True/False and it will not continue until the task is done
7 0
2 years ago
Read 2 more answers
Any one know how to fix forzas camera bc it shutters to much
igomit [66]

Answer:

LEDs are powered by alternating current AC.

Explanation:

The electricity will move in and out of cycles.

When the FPS won't math it'll flicker. Try switching to your camera's shutter speed instead. ( May be times your camera won't support it.)

6 0
2 years ago
PLZZ HELP!! ITS FOR A TEST!! Third generation computers were set apart because of this invention. A) microprocessors B) transist
Vladimir [108]

Answer:

A. Invention of microprocessor

Explanation:

The third generation of computer itself was based on the technology of integrated circuits (shorten as IC).

It lasted for about 6 years and was brought to an end with the advent of the fourth generation of computers which was based on microprocessors.

Hence, option A answers the question.

4 0
3 years ago
Read 2 more answers
There is a simple method for constructing a magic square for any odd value of n:
DaniilM [7]

Answer:

See Explaination

Explanation:

class MagicSquare():

def __init__(self,side):

self.side=side

self.two_dimension=[]

for row in range(1,side+1):

row_line=[]

for col in range(1,side+1):

row_line.append(0)

self.two_dimension.append(row_line)

def display(self):

row=0

col=int((self.side-1)/2)

for i in range(1,self.side**2+1):

self.two_dimension[row][col]=i

row-=1

col+=1

if row==-1:

row=self.side-1

if col==self.side:

col=0

if self.two_dimension[row][col]==0:

continue

else:

row+=1

if row==self.side:

row==0

for line in self.two_dimension:

for num in line:

print("{0:>3}".format(num),end=" ")

print()

def main():

for i in range(1,14,2):

square=MagicSquare(i)

square.display()

print("----------------------------------------------------")

if __name__ == '__main__':

main()

3 0
3 years ago
Other questions:
  • You can use Facebook's live feed tool to broadcast content as you post it
    8·2 answers
  • When doing a complex presentation, which of the following would be the best tool to begin designing your presentation?
    11·2 answers
  • Linguist study
    9·1 answer
  • Ethan wants to change the font in his document. He should _____.
    8·2 answers
  • Encyclopedia.com is considered to be
    15·1 answer
  • Word processing software, spreadsheet software, database software, and presentation software are examples of what category of co
    6·1 answer
  • A score of 3 or better on the exam administered at the end of which type of course usually means that you will earn college cred
    6·1 answer
  • If I got a monitor and kept my garbage laptop could I play games on max graphics?
    13·1 answer
  • What is the IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.e
    9·1 answer
  • Select the correct answer.
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!