Write code that Uses the range() in a for loop to iterate over the positions in user_names in order to modify the list g

Answers

Answer 1

Answer:

Explanation:

The range() function is a built-in function in the Python programming language. In the following code, we will use this function to iterate over all the positions in the array called user_names and add them to the list g. (assuming that is what was meant by modifying the list g)

for i in range( len(user_names) ):

   g.append(user_names[i])

This simple 2 line code should do what you are asking for.


Related Questions

Write the three working fundamental steps of a computer.​

Answers

Answer:

just tryin' to help you

Explanation:

The three stages of computing are input, processing and output. A computer works through these stages by 'running' a program. A program is a set of step-by-step instructions which tells the computer exactly what to do with input in order to produce the required output.

In general, bitmap images need to be modified before being used for mobile apps.
a) True
b) False

Answers

Answer:

True

Explanation:

If you are creating something like a mobile app, you will need to find a way to strip out a lot of the excess file size to make them work

What is his resolution amount

Answers

I think it’s 92 I mean yh

-Roll 2 standard dice
-If the sum of the dice are greater than 8, print “The sum of the dice is ____”
- print “done” at the end of the code

Answers

In python:

import random

die1 = random.randint(1,6)

die2 = random.randint(1,6)

if die1 + die2 > 8:

   print(f"The sum of the dice is {die1 + die2}")

print("done")

If you need me to change anything, I will. I hope this helps!

Your job is to write a basic blurring algorithm for a video driver. The algorithm will do the following: it will go through all pixels on the screen and for each pixel, compute the average intensity value (in red, green and blue separately) of the pixel and its 8 neighbors. (At the edges of the screen, there are fewer neighbors for each pixel.) Let's say the number of pixels on the screen is n. Then what is the order of the number of arithmetic operations (additions and divisions) required?
a. The number is order of n 4 .
b. The number is order of n2.
c. The number is order of n
d. The number is order of n3.

Answers

I’m pretty sure answer is B let me know if I’m wrong

1. When you write HTML code, you use ______ to describe the structure of information on a webpage. a. a web address b. tags c. styles d. links

Answers

Answer:

b. tags

Explanation:

When you write HTML code, you use tags to describe the structure of information on a webpage. These tags are represented by the following symbols <>. All of HTML is written using different types of tags such as <body>, <main>, <div>, <nav>, etc. Each of these serves a different purpose but are all used for structuring the specific information on a website so that the information is well organized and is not all on top of each other. This also allows for specific sections to be easily targeted and styles separately from the other sections.

If the propagation delay through a full-adder (FA) is 150 nsec, what is the total propagation delay in nsec of an 8-bit ripple-carry adder

Answers

Answer:

270 nsec

Explanation:

Ripple-carry adder is a combination of multiple full-adders. It is relatively slow as each full-adder waits for the output of a previous full-adder for its input.

Formula to calculate the delay of a ripple-carry adder is;

  = 2( n + 1 ) x D

delay in a full-adder = 150 nsec.

number of full-adders = number of ripple-carry bits = 8

 = 2 ( 8 + 1 ) x 150

 = 18 x 150

 = 270 nsec

We define the following terms:
Lexicographical Order, also known as alphabetic or dictionary order, orders characters as follows:
For example, ball < cat, dog < dorm, Happy < happy, Zoo < ball.
A substring of a string is a contiguous block of characters in the string. For example, the substrings of abc are a, b, c, ab, bc, and abc.
Given a string, , and an integer, , complete the function so that it finds the lexicographically smallest and largest substrings of length .
Input Format
The first line contains a string denoting .
The second line contains an integer denoting .
Constraints
consists of English alphabetic letters only (i.e., [a-zA-Z]).
Output Format
Return the respective lexicographically smallest and largest substrings as a single newline-separated string.
Sample Input 0
welcometojava
3
Sample Output 0
ava
wel
Explanation 0
String has the following lexicographically-ordered substrings of length :
We then return the first (lexicographically smallest) substring and the last (lexicographically largest) substring as two newline-separated values (i.e., ava\nwel).
The stub code in the editor then prints ava as our first line of output and wel as our second line of output.
Solution:-
import java.util.Scanner;
public class Solution {
public static String getSmallestAndLargest(String s, int k) {
String smallest = "";
String largest = "";
smallest = largest = s.substring(0, k);
for (int i=1; i String substr = s.substring(i, i+k);
if (smallest.compareTo(substr) > 0)
smallest = substr;
if (largest.compareTo(substr) < 0)
largest = substr;
}
return smallest + "\n" + largest;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
String s = scan.next();
int k = scan.nextInt();
scan.close();
System.out.println(getSmallestAndLargest(s, k));
}
}

Answers

Answer:

Here is the JAVA program:

import java.util.*;  

public class Solution {    // class name

   public static String getSmallestAndLargest(String s, int k) {   //method that takes a string s and and integer k and returns lexicographically smallest and largest substrings

       String smallest = "";   //stores the smallest substring

       String largest = "";   //stores the largest substring

       smallest = largest = s.substring(0, k);  //sets the smallest and largest to substring from 0-th start index and k-th end index of string s

       for(int i = 0;i<=s.length()-k;i++){  //iterates through the string s till length()-k

            String subString = s.substring(i,i+k);  //stores the substring of string s from ith index to i+k th index

            if(i == 0){ //if i is equal to 0

                smallest = subString;              }  //assigns subString to smallest

            if(subString.compareTo(largest)>0){ //checks if the subString is lexicographically greater than largest

                largest = subString;  //sets subString to largest

            }else if(subString.compareTo(smallest)<0)  //checks if the subString is lexicographically less than smallest

                smallest = subString;       }       //sets subString to smallest

       return smallest + "\n" + largest;     }  //returns the lexicographically smallest and largest substrings

   public static void main(String[] args) {  //start of main method

       Scanner scan = new Scanner(System.in);  //creates Scanner object

       String s = scan.next();  //scans and reads input string from user

       int k = scan.nextInt();  //scans and reads integer k from user

       scan.close();  

       System.out.println(getSmallestAndLargest(s, k));      }  }  //calls method by passing string s and integer k to it to display lexicographically smallest and lexicographically largest substring

Explanation:

The program takes a string s and an integer k and passes them to function getSmallestAndLargest that returns the lexicographically smallest and lexicographically largest substring. The method works as follows:

Lets say s = helloworld and k = 3

       smallest = largest = s.substring(0, k);

s.substring(0, k);  is returns the substring from 0th index to k-th index so it gives substring hel

       for(int i = 0;i<=s.length()-k;i++) This loop iterates through the string s till s.length()-k times

s.length()-k is equal to 7 in this example

At first iteration:

i = 0

i<=s.length()-k is true  so program enters the body of loop

String subString = s.substring(i,i+k); this becomes:

subString = s.substring(0,3);

subString = "hel"

if(i == 0) this is true so:

smallest = subString;

smallest = "hel"

At second iteration:

i = 1

i<=s.length()-k is true  so program enters the body of loop

String subString = s.substring(i,i+k); this becomes:

subString = s.substring(1,4);

subString = "ell"

if(subString.compareTo(smallest)<0) this condition is true because the subString ell is compared to smallest hel and it is lexographically less than smallest so :

smallest = subString;

smallest = "ell"

So at each iteration 3 characters of string s are taken and if and else if condition checks if these characters are lexicographically equal, smaller or larger and the values of largest and smallest change accordingly

After the loop ends the statement return smallest + "\n" + largest; executes which returns the smallest and largest substrings. So the output of the entire program with given example is:

ell                                                                                                                                           wor

Here ell is the lexicographically  smallest substring and wor is lexicographically  largest substring in the string helloworld

The screenshot of the program along with its output is attached.

A CPU with a quad-core microprocessor runs _____ times as fast as a computer with a single-core processor.

two

three

four

eight

Answers

Four is the rught answer i don’t think so

Answer:

four

Explanation:

quad means four so it runs four times faster

Which orientation is wider than it is tall?

Portrait
Macro
Shutter
Landscape

Answers

Answer:

Landscape

Explanation:

Landscape orientation is wider than it is tall.

Answer:

Landscape

Explanation:

Which of the following is NOT solely an Internet-based company?
Netflix®
Amazon®
Pandora®
CNN®

Answers

Answer:

I think it's Pandora, though I am familiar with others

Answer:

CNN

Explanation:

Wireless technology is best described as a/an

stationary computing system.

office computing system.

mobile computing system.

inflexible computing system.

Answers

Answer:

mobile computing system

Explanation:

Answer:

mobile computing system... C

Which feature of a database allows a user to locate a specific record using keywords?

Chart
Filter
Search
Sort

Answers

Answer:

Search

Explanation:

Because you are searching up a specific recording using keywords.

I hope this helps

Answer:

Filter

Explanation:

I got it correct for a quiz.

Create an interface called Runner. The interface has an abstract method called run() that displays a message describing the meaning of run to the class. Create classes called Machine, Athlete, and PoliticalCandidate that all implement Runner.
The run() should print the following in each class:
Machine - When a machine is running, it is operating.
Athlete - An athlete might run in a race, or in a game like soccer.
PoliticalCandidate - A political candidate runs for office.
----------------------------------------------------------------------------------------------------
public class Athlete implements Runner
{
public void run()
{
// write your code here
}
}
--------------------------------------------------------------------------------------
public class DemoRunners
{
public static void main(String[] args)
{
Machine runner1 = new Machine();
Athlete runner2 = new Athlete();
PoliticalCandidate runner3 = new PoliticalCandidate();
runner1.run();
runner2.run();
runner3.run();
}
}
------------------------------------------------------------------------------------------
public class Machine implements Runner
{
public void run()
{
// write your code here
}
}
----------------------------------------------------------------------------------------------------
public class PoliticalCandidate implements Runner
{
public void run()
{
// write your code here
}
}
----------------------------------------------------------------------------------------------------
public interface Runner
{
// write your code here
}
----------------------------------------------------------------------------------------------------

Answers

Answer:

Please find the code and its output in the attached file.

Explanation:

In the above-given code, an interface "Runner" is defined, inside the interface, an abstract method run is declared.

In the next step, three class "Athlete, Machine, and PoliticalCandidate" s defined that implements the run method, and use the print message that holds a given value as a message.

In the next step, a class "DemoRunners" is defined, and inside the main method, the three-class object is declared, which calls the run method.

 

B1:B4 is a search table or a lookup value

Answers

Answer:

lookup value

Explanation:

Technician A says that the last step in the diagnostic process is to verify the problem. Technician B says that the second step is to perform a thorough visual inspection. Who is correct

Answers

Answer:

The answer to this question is given below in the explanation section. However, the correct option is Technician B.

Explanation:

There are eight steps procedures to diagnose the engine.  

Step 1 Verify the Problem

Step 2 Perform a Thorough Visual Inspection and Basic Tests

Step 3 Retrieve the Diagnostic Trouble Codes (DTCs)

Step 4 Check for Technical Service Bulletins (TSBs)

Step 5 Look Carefully at Scan Tool Data

Step 6 Narrow the Problem to a System or Cylinder

Step 7 Repair the Problem and Determine the Root Cause

Step 8 Verify the Repair and Clear Any Stored DTCs

So the correct technician is Technician B that says that the second step is to perform a thorough visual inspection.

Please help me. Anyone who gives ridiculous answers for points will be reported.

Answers

Answer:

Well, First of all, use Linear

Explanation:

My sis always tries to explain it to me even though I know already, I can get her to give you so much explanations XD

I have the Longest explanation possible but it won't let me say it after 20 min of writing

Which of the following is true of how packets are sent through the internet?

Answers

Answer:

It is A: Packet metadata is used to route and reassemble information travelling  through the internet.

Explanation:

Step 1: The Internet works by chopping data into chunks called packets. Each packet then moves through the network in a series of hops. Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee

Step 2: Entering the network

Each packet hops to a local Internet service provider (ISP), a company that offers access to the network -- usually for a fee.

Step 3: Taking flight

The next hop delivers the packet to a long-haul provider, one of the airlines of cyberspace that quickly carrying data across the world.

Step 4: BGP

These providers use the Border Gateway Protocol to find a route across the many individual networks that together form the Internet.

Step 5: Finding a route

This journey often takes several more hops, which are plotted out one by one as the data packet moves across the Internet.

Step 6: Bad information

For the system to work properly, the BGP information shared among routers cannot contain lies or errors that might cause a packet to go off track – or get lost altogether.

Last step: Arrival

The final hop takes a packet to the recipient, which reassembles all of the packets into a coherent message. A separate message goes back through the network confirming successful delivery.

Write an application named [LastName]_MultiplicationTable and create a method that prompts the user for an integer value, for example 7. Then display the product of every integer from 1 through 10 when multiplied by the entered value. For example, the first three lines of the table might read 1 x 7 = 7, 2 x 7 = 14, 3 x 7 = 21. .. . ..

Answers

Answer:

I did this in C# & Java

Explanation:

C#:

       public static void Main(string[] args)

       {

           int input = Convert.ToInt32(Console.ReadLine());

           Multiply(input);

       }

       public static int Multiply(int input)

       {

           int ans = 0;

           for(int i =1; i<=10; i++)

           {

               ans = i*input;

               Console.WriteLine(i + "*" + input + "=" + ans);

           }

           return ans;

       }

Java:

   public static void main(String[] args)

   {

       Scanner myObj = new Scanner(System.in);  

       int input = Integer.parseInt(myObj.nextLine());

       Multiply(input);

   }

   public static int Multiply(int input)

   {

       int ans = 0;

       for(int i =1; i<=10; i++)

           {

               ans = i*input;

               System.out.println(i + "*" + input + "=" + ans);

           }

       return ans;

   }

Which of the following domestic appliances does not use a magnet?
A. Fridge
B. Pressing iron
C. Radio
D. Fan​

Answers

Pressing iron isn’t domestic appliances
answer is the Pressing iron

The __________ list is intended to facilitate the development of the leading free network exploration tool.

Answers

Answer:

Nmap development list

Explanation:

The list being mentioned in this question is known as the Nmap development list. This list basically acts as an information gathering and analytical tool. It allows the user to easily roll out and integrate Nmap tools on a network in order to easily detect all of the IP addresses that are connected as well as analyze all of the details regarding each connected individual system. All of this information is highly valuable to a developer and facilitates the development process.

Online Privacy
1.)Explain why is online privacy a controversial topic?
2.)Explain why this issue is applicable to you and your peers.
3.)Explain why this issue is a federal issue and not a state or local issue.

Answers

Answer:

Yes

Explanation:

Online privacy is a controversial topic due to the fact that it's a very hard thing to navigate. Some websites use cookies that are used to store your data so in a way there taking your privacy away which is controversial because of the way they use the information. Some websites store it for use of ads while others sell it. This issue is applicable to me and my peers because of the way we use technology. It can be used to steal my information about where I live and what I look up online. Also, the information stored could have my credit or debit card credentials. This issue should be a federal and nationwide issue because this is an everyday occurrence and leaves tons of people in crushing   debt every year.

The code below is supposed to display the name and score for the student with the highest score one time before the program ends. It is displaying Jim as the student with the highest score. It is displaying the highest score of 95. Unfortunately, Jim does not have a score of 95. Correct the following code:

Declare String students[SIZES] = {"Jen", "Jon", "Jan", "Joe", "Jim"}
Declare Integer scores[SIZES] = 70, 85, 72, 95, 90
Declare Integer index Declare Integer highest = scores[0]
Declare Integer highest Name = " " For index = 0
To SIZES //Assume that this translates to For (index = 0; index <= SIZES, index ++)
If scores[index] > highest then highest = scores[index]
End Of highestName = students[index]
End For Display "

The name of the student with the highest score is ", highest Name Display "The highest score is ", highest

Answers

Answer:

Modify

If scores[index] > highest then highest = scores[index]

End Of highest

Name = students[index]

End For Display

to

If scores[index] > highest then highest = scores[index]

Name = students[index]

End Of highest

End For Display

Explanation:

In the code, you posted the code segment that gets the name of the student with the highest score is outside the if condition that determines the highest.

To make correction, we only need to bring this code segment into the loop.

See Answer

explain how to use the information in an outline to start writing a business document

Answers

Answer: document

Explanation:

maybe try to think of an impressive title that’ll catch the readers attention or reveal the purpose of your writing in ur first paragraph of the main body

Challenge activity 1.3.6:output basics.for activities with output like below,your output's whitespace(newlines or spaces) must match exactly.see this note.write code that outputs the following.end with a newline.This weekend will be nice.​

Answers

In python:

print("This weekend will be nice.")

I hope this helps!

twentieth century music has adopted the sounds of the modern period which include synthesizers electronics and computers​

Answers

Answer: True

Explanation:

The 20th century (1900s) saw an increase in the kind and variety of music available. This was down to many innovations in the musical industry in the 20th century such as multitrack recording that made music much more accessible and easier to produce.

With these innovations as well as the advent of the age of computers, musicians and composers were able to included synthesizers and electronics in their music as well as using computers such that new sounds enveloped the world from jazz to rock to jazz fusion.

What is the maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol? Why?

Answers

Answer:

4096 VLANs

Explanation:

A VLAN (virtual LAN) is a group of devices on one or more LAN connected to each other without physical connections. VLANs help reduce collisions.

An 802.1Q Ethernet frame header has VLAN ID of 12 bit VLAN field. Hence the maximum number of possible VLAN ID is 4096 (2¹²).  This means that a switch supporting the 802.1Q protocol can have a maximum of 4096 VLANs

A lot of VLANs ID are supported by a switch. The maximum number of VLANs that can be configured on a switch supporting the 802.1Q protocol is 4,094 VLANS.

All the VLAN needs an ID that is given by the VID field as stated in the IEEE 802.1Q specification. The VID field is known to be of  12 bits giving a total of 4,096 combinations.

But that of 0x000 and 0xFFF are set apart. This therefore makes or leaves it as 4,094 possible VLANS limits. Under IEEE 802.1Q, the maximum number of VLANs that is found on an Ethernet network is 4,094.

Learn more about VLANs from

https://brainly.com/question/25867685

Plz answer me will mark as brainliest ​

Answers

Answer:

True

Operating System

Booting

Which is an example of an operating system

a
Adobe Photoshop

b
Internet Explorer

c
Windows

d
Microsoft Word

Answers

Answer:

windows

Explanation:

Examples of Operating Systems

Some examples include versions of Microsoft Windows (like Windows 10, Windows 8, Windows 7, Windows Vista, and Windows XP), Apple's macOS (formerly OS X), Chrome OS, BlackBerry Tablet OS, and flavors of Linux, an open-source operating system.

Plz answer me will mark as brainliest ​

Answers

Answer:

Application

Explanation:

Application software comes in many forms like apps, and even on computers. The software is most common on computers of all kinds while mobile applications are most common on cellular devices.

Other Questions
Rosie's family had come through New York's Ellis Island in 1907 withsuch high hopes. They knew, of course, that the streets weren't reallypaved with gold, but they looked forward to new opportunities.Opportunities did come, but along with them came hardships. Thoughthe city was exciting, it was also overwhelming. Work was hard to find,and it sometimes seemed as if no one had time to help or even noticethe new arrivals. Still, Rosie got used to her new life, and even thoughshe missed her old friends, she made new ones who helped herthrough many hard times.Which statement best explains how the setting affects the plot of this story? What best describes the legitimacy of the Caste System? What point of view is used in this quote?"It was time like these when I thought my father, who hated guns and had never been to any wars, was the bravest man who ever lived." Chance company had two operating divisions, one manufacturing farm equipment and other office supplies. Both divisions are considered separate components as defined by generally accepted accounting principles. The farm equipment component had been unprofitable, and on Sept. 1, 2016, the company adopted a plan to sell the assets of the division.The actual sale was completed on Dec. 15, 2016, at the price of $600,000. The book value of the division's assets was $1,000,000, resulting in a before-tax loss of $400,000 on the sale. The division incurred a before-tax operating loss from operations of $130,000 from the beginning of the year through Dec. 15. The income tax rate is 40%. Chances after-tax income from its continuing operations is $350,000.Required: Prepare an income statement for 2016 beginning with income from continuing operations. Include appropriate EPS disclosures assuming that 100,000 shares of common stock were outstanding throughout the year. Write an equation that represents the function (0, 2),(1,3),(2,10),(3,29),(4,66),(5, 127) Help!!! ASAP!!!The sum of the areas of a polyhedrons face isA: Its perimeter divide by two.B: its surface area.C: its volume D: non of these At the scene of Anna's death there was a hair sample found. Who does thehair sample match?Anna GarciaEric PiedmontTaylor DiazDominique HallSam GreenDr. Elise OpalFreckles WILL GIVE BRAINLIEST PLEASE HELP THIS IS DUE TOMORROW!!!!Does it matter if all dichotomous keys for the same group of organisms are different? Why was there conflict between colonists and Native Americans after the Treaty of Paris of 1763? Remember the Great Toilet Paper Shortage of 2020? Most stores havefinally restocked. Charmin makes a pack of TP with 2^4 rolls in it. Each rollhas 2^10 individual sheets. Wegman's has a shelf with 2^6 packages on it.How many sheets are there on that shelf? Final answer must be left inexponential form. Show the process but not the calculations - unless youwant to but sometimes less is more 30 POINTS Elizabeth the I was the Protestant ruler of France. Please select the best answer from the choices provided TRUE or FALSE A shirt is marked down 20% off the original price. If the original price was $24.00, what is the sale price of the shirt before sales tax?i need this now please who is 5 of the fastest people in the world (8x + 6) = ___8x = x = Question 114 ptsUsing the formula 2H202 --> 2H2O + O2, if 7.30 moles of peroxide aredecomposed, how many moles of oxygen will be formed? Pls help as soon as possible ty :) 110 % - 3/5 + (- 2 1/2) Friendship is an example of a Which best describes the location of the famous ceiling that Michelangelo painted?inside the Sistine Chapeloutside Rome, Italyinside St. Peter's Basilicaoutside Vatican City Ok same thing write me a paragraph make it good 4 sentences creative it's not for school so put what you want 20 points this time thanks to people who can't listen Cash flows from operations may not be sufficient for a firm to keep up with growth-related financing needs, or the firm may not be able to always generate enough cash flow to maintain a surplus of cash. Firms prefer to borrow now to fulfill their capital requirements through means of short-term financing or long-term financing. Both methods have their advantages and disadvantages. The following statement identifies a possible characteristic of short-term financing. Consider this case: Short-term loans usually have a lower cost than long-term loans. Identify whether the preceding statement is true or false. a. This statement is false and a disadvantage of short-term financing. b. This statement is true and an advantage of short-term financing. Firms use a variety of short-term financing sources to support working capital. Use the descriptions in the following table to identify the short-term financing source. Description Short-Term Financing Source A formal, committed line of credit extended by a bank or other lending institution. An obligation backed by collateral, often inventories or accounts receivable.