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
Naddika [18.5K]
4 years ago
6

What is the value of vals[4][1]? double[][] vals = {{1.1, 1.3, 1.5}, {3.1, 3.3, 3.5}, {5.1, 5.3, 5.5}, {7.1, 7.3, 7.5}};

Computers and Technology
1 answer:
neonofarm [45]4 years ago
4 0

Answer:

When the user concludes the value of "vals[4][1]", then it will give an exception of "ArrayIndexOutOfBoundsException".

Explanation:

  • It is because the size of the above array is [4*3] which takes the starting index at [0][0] and ending index at [3][2]. It is because the array index value starts from 0 and ends in (s-1).
  • When the double dimension array size is [5][5], then it will conclude the value of [4][1].
  • The above array have following index which value can be calculated :-- [0][0],[0][1],[0][2],[1][0], [1][1],[1][2], [2][0], [2][1], [2][2],[3][0],[3][1] and [3][2].
You might be interested in
Because mobile users consume information one screen at a time, you should ________ when you're writing to them.
Fiesta28 [93]
Answer:  C
<span>Explanation:  C) Mobile users read messages one screen at a time; therefore, divide your message into small "chunks" of information.</span>
4 0
3 years ago
Def find_max(nums: [int]) -&gt; int:
SIZIF [17.4K]

Answer:

The program in recursion is:

def find_max(nums):

    if len(nums) == 0:

         return "None"

    elif len(nums) == 1:

         return nums[0]

    else:

         return max(nums[0],find_max(nums[1:]))

Explanation:

This line defines the function

def find_max(nums):

This checks if the list is empty.

    if len(nums) == 0:

If yes, it returns "None"

         return "None"

If the list has just one element

    elif len(nums) == 1:

It returns the only element as the maximum

         return nums[0]

If the list has numerous elemente

    else:

The maximum is determined recursively

         return max(nums[0],find_max(nums[1:]))

To the (b) part:

<em>This program does not necessarily need to be done recursively because the max built-in function can be used to determine the maximum of the list in just one line of code and it is more efficient.</em>

8 0
3 years ago
Consider the following code: String word [] = {"algorithm", "boolean", "char", "double"}; for ( int i =0; i &lt; word.length/2;
KiRa [710]

Answer:

{"double", "char", "char", "double"} will be stored in word.

Explanation:

Given the word is an array of four strings,  {"algorithm", "boolean", "char", "double"}. Hence, the length of the word array is 4.

The for-loop will only run for two iterations due to i < word.length/2, with i = 0 (first loop) and i = 1 (second loop).

In the first loop,  

  • word[word.length - 1 - i]  =  word[4 - 1 - 0]  = word[3]  = "double"
  • Hence, the string "double" will be assigned to word[0] and overwrite "algorithm"

In the second loop,

  • word[word.length - 1 - i]  =  word[4 - 1 - 1]  = word[2]  = "char"
  • Hence, the string "char" will be assigned to word[1] and overwrite "boolean"

At last, the word array will hold {"double", "char", "char", "double"}

8 0
4 years ago
Read 2 more answers
चार फरक छुट्याउनुहोस् ।) 3. Write down any four provisions of cyber ethic साइबर नैतिकताका कुनै चार प्रावधानहरु लेख्नुहोस् ।​
Kruka [31]

Answer:

Five provisions of cyber ethics are:

Your computer or system should not be used to harm others. Your cyber knowledge should not be used to steal other people's resources. One should not use or copy softwares for which you have not paid. ... Never use other people's resources without their consent.

7 0
3 years ago
Which of the following are all involved in the evaluation of the presentation of a speech?
ikadub [295]

Answer:

C.

Explanation:

The elements involved in the evaluation of the presentation of a speech includes visual aids, vocal technique, and body language.

Adding vivid pictures in the presentation makes it graphic and proficient. The visual aids in presentation also provides the succinct and clear meaning of the message to the reader.

The vocal technique is another element that adds value in presentation. A speaker's confidence is reflected through his/her tone. It is the speaker's voice that becomes an influential tool that draws the audience's attention.

Body language, like vocal technique, helps in effective delivering of the speech. Body language is a non-verbal form of communicatin that communicates a lot to the audience than one can imagine.

Therefore, option C is correct.

6 0
3 years ago
Other questions:
  • For microsoft word tabs are very useful when you want to
    13·1 answer
  • The two variables causing the point of difference between the time codes are the frequency and the count
    6·1 answer
  • A spreadsheet is a software program for storing, managing, and retrieving information. true or false?
    15·2 answers
  • Which practice represents the trait of effective communication?
    6·2 answers
  • __________ makes the hardware usable, while __________ commands it to perform specific tasks. a.) The operating system, RAM b.)
    10·2 answers
  • Write a program that uses a stack to test input strings to determine whether they are palindromes. A palindrome is a sequence of
    7·1 answer
  • Write a program that gets a list of integers from a user. First, the user should be asked to enter the number of integers to be
    5·1 answer
  • Which of the following devices can be connected to a network? Check all of the boxes that apply.
    9·1 answer
  • Write its features:features of computer ​
    15·1 answer
  • What do you call the processing of converting an image to binary?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!