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
Dominik [7]
3 years ago
9

Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for the given prog

ram Gus Bob Ann 1 short_names- Your solution goes here 2 # print names 4 print(short_names[0])
Computers and Technology
1 answer:
Ksenya-84 [330]3 years ago
3 0

Answer:

shortNames = ['Gus', 'Bob','Zoe']

Explanation:

In this assignment, your knowledge of list is been tested. A list is data structure type in python that can hold different elements (items) of different type. The general syntax of a list is

listName = [item1, "item2", item3]

listName refers to the name of the list variable, this is followed by a pair of square brackets, inside the square brackets we have items separated by commas. This is a declaration and initialization of a list with some elements.

The complete python code snippet for this assignment is given below:

<em>shortNames = ['Gus', 'Bob','Zoe']</em>

<em>print(shortNames[0])</em>

<em>print(shortNames[1])</em>

<em>print(shortNames[2])</em>

You might be interested in
A student is curious about how a Web site appears on his computer screen. On a piece of paper,
Temka [501]

Answer:

When you go out to open a web page then you should know that It’s not the OSI model that comes into the picture, and in fact, it is just for study purposes, and it does not work in real network work, The exact one used is the TCP/IP model. However, the OSI model separates the concepts into various layers, and hence used for study purposes.

When you try to open a web address through a web browser, then the web browser uses the HTTP that is an Application layer protocol.

The web browser thus finds the IP address of the URL through the Domain Name System. And this is as well the Application layer protocol.

However, you will find that the actual process is even more complex.

The browser now forms an HTTP packet which mentions, “Hello I would like to get the web page from the server”. Now the browser sends the HTTP packet to the TCP, which stands for Transmission control protocol, and is a transport layer protocol.

Here the adjacent layer interaction works. However, that is on the same device, and currently, the packet is on your PC only. The ALI states that the higher layer asks the next lower layer protocol to get done the service, and the lower layer delivers the service to the higher layer just above it. And this interaction gets repeated until the data finds itself at the lowest layer.

The main job of the TCP is to create a pipe in between you and the server, such that the data can be transferred via the pipe. And for this the TCP on your PC talks to the TCP on the server.

Now the TCP puts up its details over the HTTP packet. And these are necessary for managing the pipe/session.

Now the packet is handed to the IP process or the internet protocol, which is an internet layer protocol. The main task performed by the IP is addressing and routing. It's like a postal service, that routes the letter via various postal offices to reach the correct one. IP now puts its info on top of the TCP packet. This info is required for routing on the internet.

The packet is now handed over to the network access or the network interface layer. And this defines the hardware and protocols that are required for delivering the data via the physical network. The majority of the times the physical network used is the Ethernet.

Your PC now binds the IP packet in between the Ethernet header and the Ethernet trailer, and thus forms an Ethernet frame. You should know that Ethernet has a MAC address that is being made use of for sending the frame within the LAN.  And now the PC transmits the Ethernet frame bits physically with the help of the electricity that flows through the Ethernet Cables.

The packet now reaches the server. The web server recreates the bits through the interpretation of the electrical signals. And the webserver now removes and discards the ethernet header and trailer from the ethernet frame, and de encapsulates it. And in the same manner, it reads through the TCP data, and finally transfers that to the HTTP process which can figure out the HTTP get request.

Now the webserver in s similar manner sends back the detail. And this process can be repeated any number of times.

Also, keep in mind that in case of secure website, there is one extra step, and that is the verification of the SSL certificate, at both the client and server end. Rest of the process is same.

Explanation:

Please check the answer section.

6 0
3 years ago
Suppose the work required to stretch a spring from 1.1m beyond its natural length to a meters beyond its natural length is 5 J,
Nadya [2.5K]

Answer:

Explanation:

The formula for the work done on a spring is:

W = \frac{1}{2}kx^{2}

where k is the spring constant and x is the change in length of the string

For the first statement,

x = (a-1.1), W = 5

=> 5 = \frac{1}{2}k(a-1.1)^{2}

Now making k the subject of formula, we have:

k = \frac{10}{(a-1.1)^2}  ---------------- (A)

For the second statement,

x = (a-4.8), W = 9

=> 9 = \frac{1}{2}k(a-4.8)^{2}

Now making k the subject of formula, we have:

k = \frac{18}{(a-4.8)^{2} } ------------------------- (B)

Equating A and B since k is constant, we have:

\frac{10}{(a-1.1)^{2} } = \frac{18}{(a-4.8)^{2} }

solving for the value of a

8a^{2} +56.4a-208.62=0

solving for a, we get:

a = 2.6801 or -9.7301

but since length cannot be negative, a = 2.68m

substituting the value of a in equation B, we have:

k=\frac{18}{(2.68-4.8)^{2} }

k = 4.005

6 0
4 years ago
The following method is intended to remove all values from the ArrayList a that have the same value as val; however, this method
Alona [7]

Answer:

ArrayList a contains [2, 3, 3, 3, 4, 5, 3, 2, 1]

Explanation:

Given

The removeValue method

Required

The content of ArrayList a, after the method is called

From the question, we understand that arraylist a is:

a= [2, 3, 4, 3, 3, 4, 4, 5, 4, 3, 2, 1]

val =4

The function fails when the value to be removed appear consecutively in the list.

4 appears in index 5 and 6 of the list. Only one of the 4's will be removed

So, the updated list will be: [2, 3, 3, 3, 4, 5, 3, 2, 1]

6 0
3 years ago
LISTEN I NEED EVERY SINGLE BRAINLY USER TO RE POST THIS THERE IS A USER WHO JUST SAID THEY ARE GOING TO KILL THEMSELVES PLEASE C
Over [174]
WHAT IS THE NAME OF THE BRAINLY USER
7 0
3 years ago
Read 2 more answers
PLEASE HELP ME! How should you behave in an online academic environment? Check all that apply. Keep messages brief Respect the c
Colt1911 [192]

Answer:

Maintain discipline

Ask questions

Try not to crack jokes

dress smartly

be friendly

dont underestimate anyone each person have their own unique skills

Explanation:

4 0
4 years ago
Read 2 more answers
Other questions:
  • Type the correct answer in the box. Spell the word correctly.
    14·2 answers
  • Which computer device helps you input data in the form of text, numbers, and commands?
    9·1 answer
  • C++
    8·1 answer
  • Throughout the course we have covered a lot of topics in relation to information systems. Select one or two of the major topics
    14·1 answer
  • Write a shell (text-based) program, called first_word.py, that opens the file stuff.txt and prints out the first word of every l
    14·1 answer
  • How do you delete an credit card off an iPhone 7
    5·1 answer
  • When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means
    7·1 answer
  • Dis-cord and/or snap????????????? Im 13 ! and a girl :)))))
    12·2 answers
  • What are the main dimensions of information system and their components
    13·1 answer
  • Join the class <br> The class code is hello112
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!