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
Tpy6a [65]
3 years ago
14

What does the following code print to the console?

Computers and Technology
1 answer:
UNO [17]3 years ago
6 0

Answer:

although there are errors in this program but it'd print Ireland and Colombia

if you need help in python programming language, hit the comment section

You might be interested in
My texts to people keep disapearring snd id k what to do. i text through pad let.
MakcuM [25]

Answer:

oh that sad am bored who eles is bored

Explanation:

7 0
3 years ago
Read 2 more answers
Suppose 8 people want to communicate with each other using public key encryption. The communication between any pair of them is
ludmilkaskok [199]

Answer:

The answer is "64"

Explanation:

There has been 1 Private Key 1 Public Key for every person. The private key is used for other app messages. All else uses the Public Key to encrypt messages with that user. Those keys are numerically related. Even if you have 5 users, you will be given 5 Personal keys and 5 Public keys.

  • All user will have a duplicate of other public keys, which indicates (n*n-1) copies of n public keys on different systems to make sure shared contact between all users, plus n private keys.
  • The unique key count is 2n, with n^2 distributed private and public keys on different systems.
  • 8 people,  where 8 is a number, that is equal to n so, n^2 = 8^2 =8 \times 8 = 64
5 0
3 years ago
C++You are given an array x of int elements along with an int variable n that contains the number of elements in the array . The
Firdavs [7]

Answer:

C++ Code

#include <iostream>

using namespace std;

int median(int x[], int n)

{

   for (int i = 0; i < n-1; i++)

   {

   for (int j = 0; j < n-i-1; j++)  

       if (x[j] > x[j+1])

       {

           int temp = x[j];

           x[j] = x[j+1];

           x[j+1] = temp;

       }

   }

   if( n%2 == 0 )

   {

       return (x[ (n/2) -1] + x[n/2])/2;

   }

   else

   return x[n/2];

}

int main()

{

   //example 1

   int x[] = {5,8,1,7,9};

   int n = 5;

   

   int m = 0;

   m = median(x,n);

   cout << m << endl;

   

   //example 2

   int x2[] = {3,7,1,4,6,9};

   int n2 = 6;

   m = median(x2,n2);

   cout << m << endl;

}

Explanation:

The main program contains the examples given in the question.

Function Explanation: The function int median(int x[], int n) takes two arguments, one is the array x and the other is the size of the array n.

First, the function sorts the elements in ascending order.

After that, it is calculated whether n is even or odd. If n is an even number,  The middle numbers can be obtained as follows:

Divide n by 2 to get the first middle element.

The second middle element is the element before first middle element, therefore

x[ (n/2 )-1] + x[n/2] gives us the sum of middle elements, where as dividing it by 2 gives us the avg of the two numbers.

If n is an odd number, than the middle element can be simply returned by dividing n by 2.

The working of the program is as follows

Array 1: 5 8 1 9 7

After sorting, it becomes: 1,5,7,8,9.

Array indices are : 0,1,2,3,4. Middle element is at index 2, n = 5, therefore n/2 = 2.5 (This is rounded down to 2 because result is stored in integer)

Array 2: 3 7 1 4 6 9

After sorting, it becomes: 1 3 4 6 7 9

Array indices are : 0,1,2,3,4,5. Middle element is at index 2 and 3,n = 6, therefore it can be obtained by n/2-1 and n/2 (n/2 = 3 and n/2 - 1 = 2)

3 0
3 years ago
Pls help me po:{<br><br> I need the answer lang po talaga , pls:{
julsineya [31]

Answer:

for cutting it's scissors for measuring it's the tiny measurement spoonlikes for mixing it's the blender and preparatory

7 0
2 years ago
In computer security what do the rows and columns correspond to in an 'Access Control Matrix'. What does each cell in the matrix
Tcecarenko [31]

Answer:

Explanation:

An Access Control Matrix ACM can be defined as a table that maps the permissions of a set of subjects to act upon a set of objects within a system. The matrix is a two-dimensional table with subjects down the columns and objects across the rows. The permissions of the subject to act upon a particular object are found in the cell that maps the subject to that object.

Summary

The rows correspond to the subject

The columns correspond to the object

What does each cell in the matrix contain? Answer: Each cell is the set of access rights for that subject to that object.

4 0
3 years ago
Other questions:
  • 5. Write a function that takes two lists of integers and returns a list containing tuples with corresponding elements from both
    8·1 answer
  • 6. The NADH and FADH2 produced during the Krebs cycle pass their electrons down the 7. __ __ __ __ __ __ __ __ __ __ __ __ __ __
    6·1 answer
  • That agreement received after completing it to your program at a community college is called a
    14·1 answer
  • 1.Can ICTs be innovatively used in the absence of minimum literacy levels among the poor?
    5·1 answer
  • To obtain the desired speedup, make sure your new function recursively calls itself no more than once in the body of the method.
    8·1 answer
  • Why is graphics important in multimedia application <br>​
    11·1 answer
  • Scrabble is a word game in which words are constructed from letter tiles, each letter tile containing a point value. The value o
    8·1 answer
  • Kevin is a DJ and has a passion for creating and modifying audio tracks. Which application software facilitates him in his passi
    6·1 answer
  • Software piracy is acceptable as it helps us obtain software cheaper or sometimes even for free.
    11·2 answers
  • PYTHON CODING QUESTION
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!