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
katen-ka-za [31]
3 years ago
9

What is output by the following code?

Computers and Technology
1 answer:
Inessa05 [86]3 years ago
8 0
When numbers are divided, the integer portion is kept and the remainder is disregarded (meaning 10/9 would return 1). Following this format, we get the answer of <span>6 6 6 3 7 7 9 5 8 8. 
I also see that this program can be optimized because you use the same for loop twice, and both of them manipulate list elements in some way. A more optimized program would be:

</span><span>int a [] = {64 , 66 , 67 , 37 , 73 , 70 , 95 , 52 , 81 , 82};

for (int i = 0; i < a.length; i++) {
  a[i] = a[i] / 10;
  </span>System.out.print(a[i] + " ");<span>
}

Or maybe you don't need to store the list values for later on. You could do:

</span>for (int i = 0; i < a.length; i++) {
  System.out.print(a[i] / 10 + " ");
}

In any situation, your answer is choice 2.
You might be interested in
How is fraudulent email spread that makes it so difficult to track?
trapecia [35]
The owner of the email could be using a VPN.
8 0
3 years ago
Which of the following is a field whose value uniquely identifies each record in a
s2008m [1.1K]

A field whose value uniquely identifies each record in a table is called: C. Primary key.

<h3>What is DBMS?</h3>

DBMS is an acronym for database management system and it can be defined as a collection of software applications that enables computer users to create, store, modify, retrieve and manage data or information in a relational database.

This ultimately implies that, DBMS allow end users to efficiently store, retrieve and manage their data with an appropriate level of security.

In database management system (DBMS), a primary key is a field whose value uniquely identifies each record in a table or relational database.

Read more on primary key here: brainly.com/question/8131854

5 0
2 years ago
Rick is a fan of logic-based games. However, he is bored of the classic ones, like Sudoku and Mastermind, since he has solved so
Misha Larkins [42]

Answer:

The function is as follows:

import random

import string

def solution(riddle):

   s = list(riddle)

   for i in range(len(riddle)):

       alpha = "".join(random.choice(string.ascii_letters) for x in range(1))

       alpha = alpha.lower()

       if s[i] == '?':

           if i > 0 and i < len(s)-1:

               if s[i+1] != alpha:

                   s[i] = alpha

               elif s[i-1] != alpha:

                   s[i] = alpha

               else:

                   i=i

           else:

               if i == 0:

                   if s[1] != alpha:

                       s[i] = alpha

                   else:

                       i = i

               else:

                   if s[i-1] != alpha:

                       s[i] = alpha

                   else:

                       i = i

   riddle = ""

   for ele in s:

       riddle+=ele

   

   return riddle

Explanation:

See attachment for explanation where comments are used to explain some lines

Download txt
3 0
3 years ago
Which of the following is an example of a recommendation engine?
ahrayia [7]

a. A printout of all sales taken from the register at the end of the day Amazon providing you a list of products similar to others you've viewed

Explanation:

A recommendation engine is something which according to its user's preference provide them a list of similar objects. From various platforms according to its user's preference.

Similarly, Amazon shows you a variety of previous products which you have purchased. So, in this case option a is most appropriate. Here Amazon will first observe different sales trend from the register then as a recommendation engine it will provide you with a list of products similar to others you have viewed.

7 0
3 years ago
What happens when a string doesn’t include the separator that’s specified in the parameter of the split() method?
Brilliant_brown [7]

Answer:

Nothing

Explanation:

If a seperator value is provided as an argument within the split() method and the string does not include that value then the string will remain the same and will not be split. If no value is provided as an argument within the split() method, then the string that the method is being applied to will automatically be split in every space character (" ") that exists within it. This is the default value of split() when no argument is passed to it.

5 0
3 years ago
Other questions:
  • If you have a database with birthdates, and you would like to find everyone who was born before June 16, 1967, what would you en
    15·2 answers
  • What is the purpose of fcc?
    5·1 answer
  • Why should you stay out of the open space to the right of a semi-tractor-trailer?
    7·2 answers
  • Why are hardline Ethernet connections always faster than WiFi?
    8·1 answer
  • What are the advantages of upgrading computer hardware?
    13·2 answers
  • A set of parentheses that contain zero or more arguments
    12·1 answer
  • An option already selected by windows is called____ ( default option/ default selection)​.
    6·1 answer
  • How to shutdow computer
    7·1 answer
  • An array similar to a phone book has 1000 names arranged as names [0], names[1]....names[999]. Nancy wants to search a name X in
    15·1 answer
  • What are the different types of computer operating systems?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!