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
Andru [333]
3 years ago
13

Given the following code segment, how can you best describe its behavior? i ← 1 FOR EACH x IN list { REMOVE(list, i) random ← RA

NDOM(1, LENGTH(list)) INSERT(list, random, x) i ← i + 1 }Required to answer. Single choice.
a. This code replaces everything in the list with random numbers.
b. This code shuffles the order of the numbers in the list by removing them and inserting them back in a random place.
c. This code removes all of the numbers in the list and inserts random numbers in random places in the list.
d. This code errors by trying to access an element at an index greater than the length of the list.
Computers and Technology
1 answer:
garik1379 [7]3 years ago
6 0

Answer:

Well, this code would box the whole body of an html document. by using the relative value for position, you are telling it to position relative to its normal position, which the top left corner is at (0,0). by using left: 50px, you are telling the box to set the left margin edge to 50px and by using top: 50px, you are telling it to set the top margin edge to 50px. by doing this shifting, the top left corner of the box, which is at (0,0) would be positioned at (50,50)

You might be interested in
Quick time and flash are two examples of what product
zheka24 [161]

there apps .........

8 0
3 years ago
The relationship between social media and the Internet is complex. Individual Internet behavior involves a myriad of factors tha
Artemon [7]

Answer:

Explanation:

The internet could be regarded has a marketplace or platform which gives individuals, businesses the opportunity to interact, relate, access opportunities, learn in an easy manner with the help of a data connection. The internet has redefined the process and concept of acesing information and interaction with the ease and coverage it brings. The Social media is could be seen a part of the internet platform which allows people to relate and interact, make friends, promote brands and so on. The internet and social media platforms however, in spite of its huge benefits comes with its inherent risk. Including the surge in cyber crime, immorality and information theft to mention a few. Common scenarios whereby banking details are being stolen from databases resulting in wholesale illegal transfer of funds. Issues of blackmail and violent defamation by groups of cohorts has also been a con in the advent of internet and social media, including growing trends of fake news which usually escalate tension, in which the recent unrest in my vicinity benefitted negatively from.

7 0
3 years ago
Why doesn't the ad load ?
baherus [9]
Try refreshing the page, if not restart your device check your internet etc.
3 0
2 years ago
Read 2 more answers
Instructions Write a program that allows the user to enter the last names of five candidates in a local election and the number
KengaRu [80]

Here is code in java.

import java.util.*;

class Election

{ //main method

   public static void main(String args[]){

      // create an object of Scanner class to read input

      Scanner s = new Scanner(System.in);

      // string array to store name of candidates

       String name[] = new String[5];

       // int array to store vote count of candidates

       int v_count[] = new int[5];

       double p = 0;

       int i = 0, sum = 0, high =0, win = 0;

for(i = 0; i < 5;i++)

       {

          System.out.print("last name of Candidate " + (i+1) + ":");

          // read name of Candidate

          name[i] = s.next();

          System.out.print(" number of votes received: ");

          // read vote of Candidate

           v_count[i] =s.nextInt();

if(v_count[i] > high)

              {

                  // highest vote

                  high = v_count[i];

                  win = i;

              }

              // total vote count

           sum +=v_count[i];

       }

     // printing the output

      System.out.println("\nCandidate\tVotes Received\t% of TotalVotes\n");

       for(i = 0; i < 5;i++)

       {

           // % of vote of each Candidate

           p =(v_count[i]*100)/sum;

           // print the output

          System.out.println(name[i] + "\t\t" + v_count[i] + "\t\t\t" +p);

       }

       // print the total votes

      System.out.println("\nTotal Votes:\t" + sum);

      // print the Winner of the Election

       System.out.println("Winner of the Election is: " + name[win]);

   }

}

Explanation:

Create a string array "name" to store the name of candidates.Create Integer array "v_count" to store votes os each candidates.Calculate total votes of all candidates and find the highest vote amongst all candidate and print it.Find % of votes received by each candidate.Print these stats.

Output:

last name of Candidate 1:patel

number of votes received: 54

last name of Candidate 2:singh

number of votes received: 76

last name of Candidate 3:roy

number of votes received: 33

last name of Candidate 4:yadav

number of votes received: 98

last name of Candidate 5:sharma

number of votes received: 50

Candidate       Votes Received  % of TotalVotes

patel           54                      17.0

singh           76                      24.0

roy             33                      10.0

yadav           98                      31.0

sharma          50                      16.0

Total Votes:  311

Winner of the Election is: yadav

8 0
2 years ago
3. SmartArt can be used to create that highlight relationships between two items.
KengaRu [80]
<span>SmartArt can be used to create graphic organizers (Solution:B) that highlight relationships between two items. With SmartArt you can make visual representation of your ideas and information. The tool SmartArt is available </span>in Excel, PowerPoint, Word, but also you create SmartArt object in Outlook.
There are different layouts available for this type of representation.
8 0
3 years ago
Other questions:
  • A drop-down menu must be contained by
    5·1 answer
  • The producer thread will alternate between sleeping for a random period of time and inserting a random integer into the buffer.
    7·1 answer
  • Which one of the following is a correct declaration for a method named passAList that has as arguments an array list myList of s
    8·1 answer
  • A provides legal protection for something an individual has created
    12·1 answer
  • Explain three specific &amp; major security threats to internet users. In each case, address whether or not the vulnerabilities
    15·1 answer
  • Demonstrate the register addressing mode for the following instructions. Also what addressing mode belongs to these instructions
    11·1 answer
  • What are acenders? What are decenders?
    10·2 answers
  • A ____ is a share of ownership in a company
    11·2 answers
  • What is a zerø-day exploit? No go.ogle &gt;:(
    10·1 answer
  • Alice is watching a speech over the internet. what type of message is alice attending to?
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!