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
Kamila [148]
2 years ago
11

Consider the following declaration:

Computers and Technology
1 answer:
Arturiano [62]2 years ago
4 0

Answer:

B, C, B

Explanation:

According to my understanding of these questions, these are in Java.

For the first one, there is a built in function called .length() for a string, so it's answer B.

For the second one, this should come out as C, 0 since compareTo compares the ascii values of the characters.

The third one's answer should be B. s1.equals(s2) for characters that are caps and not caps comes out with false, so ! would negate it. s1.equalsIgnoreCase(s2) would come out as true, ignoring the cases of APPLE.

You might be interested in
The mathematical constant Pi is an irrational number with value approximately 3.1415928... The precise value of this constant ca
tatiyna

Answer:

I am writing a Python program:

def approxPIsquared(error):

   previous = 8

   new_sum =0

   num = 3

   while (True):

       new_sum = (previous + (8 / (num ** 2)))

       if (new_sum - previous <= error):

           return new_sum

       previous = new_sum

       num+=2    

print(approxPIsquared(0.0001))

Explanation:

I will explain the above function line by line.

def approxPIsquared(error):  

This is the function definition of approxPlsSquared() method that takes error as its parameter and approximates constant Pi to within error.

previous = 8     new_sum =0      num = 3

These are variables. According to this formula:

Pi^2 = 8+8/3^2+8/5^2+8/7^2+8/9^2+...

Value of previous is set to 8 as the first value in the above formula is 8. previous holds the value of the previous sum when the sum is taken term by term. Value of new_sum is initialized to 0 because this variable holds the new value of the sum term by term. num is set to 3 to set the number in the denominator. If you see the 2nd term in above formula 8/3^2, here num = 3. At every iteration this value is incremented by 2 to add 2 to the denominator number just as the above formula has 5, 7 and 9 in denominator.

while (True):  This while loop keeps repeating itself and calculates the sum of the series term by term, until the difference between the value of new_sum and the previous is less than error. (error value is specified as input).

new_sum = (previous + (8 / (num ** 2)))  This statement represents the above given formula. The result of the sum is stored in new_sum at every iteration. Here ** represents num to the power 2 or you can say square of value of num.

if (new_sum - previous <= error):  This if condition checks if the difference between the new and previous sum is less than error. If this condition evaluates to true then the value of new_sum is returned. Otherwise continue computing the, sum term by term.

return new_sum  returns the value of new_sum when above IF condition evaluates to true

previous = new_sum  This statement sets the computed value of new_sum to the previous.

For example if the value of error is 0.0001 and  previous= 8 and new_sum contains the sum of a new term i.e. the sum of 8+8/3^2 = 8.88888... Then IF condition checks if the

new_sum-previous <= error

8.888888 - 8 = 0.8888888

This statement does not evaluate to true because 0.8888888... is not less than or equal to 0.0001

So return new_sum statement will not execute.

previous = new_sum statement executes and now value of precious becomes 8.888888...

Next   num+=2  statement executes which adds 2 to the value of num. The value of num was 3 and now it becomes 3+2 = 5.

After this while loop execute again computing the sum of next term using       new_sum = (previous + (8 / (num ** 2)))  

new_sum = 8.888888.. + (8/(5**2)))

This process goes on until the difference between the new_sum and the previous is less than error.

screenshot of the program and its output is attached.

6 0
3 years ago
If you do not use the mini toolbar, it remains on the screen. _______________​ Group of answer choices True False
Digiron [165]

Answer:

The answer is "False".

Explanation:

The mini toolbar is a part of the windows and other operating systems, which available on the editing tool. It is also known as a toolbar, that is often shown with the right mouse.

  • This toolbar gives you access to the most popular configuration functions and is shown over the take-down shortcut menu.
  • It validates and becomes successful as you shift the cursor to the mini toolbar.

4 0
3 years ago
Define a function that will return the length of a list
Alexus [3.1K]

Answer:

len()function:

Explanation:

that's for python btw

i also know java if you want a java version

3 0
2 years ago
What two functions does tcp/ip perform?
svetlana [45]

The two functions does tcp/ip are:

  • Reassemble data packets at the destination.
  • Request servers for data the user wants.

<h3>What are the functions of TCP IP?</h3>

The role of the Transmission Control Protocol is known to be the one that helps to take in and put together the Data Packets while that of IP is to send the Data Packets to the right location or destination.

Therefore, The two functions does tcp/ip are:

  • Reassemble data packets at the destination.
  • Request servers for data the user wants.

Learn more about tcp/ip from

brainly.com/question/17387945

#SPJ1

4 0
2 years ago
From your fist impression, write down what first comes to mind as to what is good and bad about the way the device works.
nalin [4]

Answer:

xczczxczx

Explanation:

6 0
3 years ago
Other questions:
  • Remember that the function "main" takes optional parameters, these being common:
    10·1 answer
  • All java classes must contain a main method which is the first method executed when the java class is called upon.
    10·1 answer
  • To determine what to study, one should first
    8·1 answer
  • Choose the HTML5 element below that is used to configure an area on a web page that can stand on its own and could potentially b
    5·1 answer
  • Do you think JNK should be more ethical?
    6·1 answer
  • What is the output by the code system.out.print(8-4+2);
    13·1 answer
  • An application's certificate indicates the application -
    5·1 answer
  • What is a computer please tell me ​
    10·2 answers
  • What dictionary operation can you use to remove all the keys within the dictionary-named contacts?
    6·1 answer
  • In a database, what term is used to describe a group of fields that are all associated with and accessed using single primary ke
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!