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
aleksley [76]
3 years ago
6

The following code is intended to test whether the int variable num is less than 10, and if so print a warning and set it to 10.

The code then prints the value of num.
if (num < 10)
System.out.println( "This is smaller than 10" );
num = 10;
System.out.println("Value of num is " + num);
What correction should be made so the code functions as intended?

An else statement should be added between the 3rd and 4th lines
The final line should be printed every time, not just when num hasn’t been changed.
A semicolon should be added at the end of the first line
The operator ‘<’ should be changed to ‘<=’ in the if statement
No correction should be made
Curly braces ‘{ }‘ should be added to enclose the second and third lines

Computers and Technology
1 answer:
hoa [83]3 years ago
6 0

The only correction I see is you need to add curly braces to enclose the second and third lines.

You might be interested in
Write the code to create a variable score and assign it the value 0?​
Galina-37 [17]

Answer:

You can assign a value to a routine variable in any of the following ways:

Use a LET statement.

Use a SELECT INTO statement.

Use a CALL statement with a procedure that has a RETURNING clause.

Use an EXECUTE PROCEDURE INTO or EXECUTE FUNCTION INTO statement.

Explanation:

4 0
3 years ago
As text is typed in the _____ text box, a drop-down list displays options for completing the action, displaying information on t
pickupchik [31]

Answer:

Excel Help

Explanation:

Press F1 key to open the excel help window

Or you can also click the excel help button to launch the help window.

Type for whatever you are seeking help for and you will notice suggestions as you type something. These suggestions include online and offline results. If there are too many results then try searching offline it will narrow down the results.

After typing the text and hitting enter, the excel help returns several related topics on the searched query. You can browse through these topics and get help from excel.

5 0
3 years ago
What decimal number does the bit pattern 0×0c000000 represent if it is a two's complement integer?
Cerrena [4.2K]
<span>The answer is </span><span>201326592.  The </span>decimal number that the bit pattern 0×0c000000 represent if it is a two's complement integer is 201326592.  
6 0
4 years ago
Pls help!!!!!!!!!!!!
son4ous [18]

Answer:

i am 100% sure it is (B)

Explanation:

To delete offensive or irrelevant posts  

5 0
4 years ago
Choose the 3 correct statements for the code below.
Nookie1986 [14]

Answer:

True

False

True

False

True

Explanation:

So I'll go through each statement and explain why or why not they're correct.

An object of the ActivationLayer class has a name attribute. So because ActivationLayer is inheriting the BaseLayer and it's calling super().__int__("Activation") it's going to call the BaseLayer.__init__ thus setting a name attribute equal to "Activation" for any ActivationLayer object that is initalized. So this is true

An object of the BaseLayer class has a size attribute. While it is true that FC layer is inheriting from BaseLayer and it has a size attribute, this does nothing to change the BaseLayer class. So any object initialized to a BaseLayer object will only have the instance attribute "self.name". So this is false

print(FCLayer(42)) prints FullyConnectedLayer. So whenever you print an object, it tries to convert the object to a string using the __str__ magic method, but if that wasn't defined it then tries the __repr__ method, which the FCLayer class technically doesn't define, but it inherits it from the BaseLayer class. And since whenever you define an FCLayer object it calls super().__init__ with "FullyConnected", which will then be assigned to the instance variable self.name,  it will print "FullyConnectedLayer". So this is true

When creating an object of the ActivationLayer class, the size argument must be given. This is true, because the size is a parameter of the __init__ method of ActivationLayer, it is not an optional parameter, and is something that must be passed otherwise an error will be raised. So this is false

When creating an object of the BaseLayer class, the name argument must be given. This is not true, because name is a default argument. This means if you do not pass an argument for name, then name will equal an empty string

4 0
2 years ago
Other questions:
  • Only the _________ can add users with passwords and limit user access to selected areas.
    5·1 answer
  • When entering a function or formula in a cell, which is the first character you must type?
    15·2 answers
  • The two key elements of any computer system are the ________ and the ________.
    12·1 answer
  • What are the possible sources of the information that defines the functional dependencies that hold among the attributes of a re
    15·1 answer
  • Approximately what percent of desktop PCs are used for work-related purposes?
    13·2 answers
  • What occurs when an application sends user-fed data directly to a web browser without authenticating or deleting the content? Cr
    15·1 answer
  • Your task is to diagnose and correct the problem. In the computer, the top hard drive contains the operating system files. Troub
    14·1 answer
  • Which of the following shows the assignment of a string to a variable? Select 3 options.
    11·2 answers
  • A line graph is a great tool for showing changes over time. Why is a line graph better than other graphs at showing this type of
    6·1 answer
  • For each problem listed below, use the drop-down menu to select the field of the professional who can help solve the issue.
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!