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

CHALLENGE 7.1.1: Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output f

or the given program Gus Bob Ann 1 short_names- Your solution goes here 2 # print names 4 print(short_names[0]) 5 print(short names [11) 6 print(short_names[2])
Computers and Technology
1 answer:
vlabodo [156]3 years ago
3 0

Answer:

short_names = ["Gus", "Bob", "Ann"]

print(short_names[0])

print(short_names[1])

print(short_names[2])

Explanation:

There are some typos in your code. In addition to the missing part of the code, I corrected the typos.

First of all, initialize the list called short_names. The list starts with "[" and ends with "]". Between those, there are must be the names (Since each name is a string, they must be written between "" and there must be a semicolon between each name)

Then, you can print each name by writing the name of the list and the index of the names between brackets (Index implies the position of the element and it starts with 0)

You might be interested in
In the ADT graph the methid addVertex has efficiency
sweet-ann [11.9K]

Answer:

In ADT graph the efficiency of addVertex has efficiency O(logn).

Explanation:

The time complexity of the method addvertex in ADT graph is O(logn). addVertex method has time complexity of O(logn) because it has to divide the list in half and add the vertex according to the place where the needs to be added.

hence we conclude that the answer is O(logn).

6 0
3 years ago
14 Copy a picture of a crane on the next page. Do not trace them. Make a freehand sketch. (2) 2 Look at the placed where the Mar
PtichkaEL [24]

Answer:

Hope it helps.have a look.

3 0
2 years ago
Should I download RAM on my computer?
jenyasd209 [6]

Well, if you want to, make sure it's safe.

I don't know what RAM really is, but check if it's safe first. And maybe talk it out with your parents.

That's all I gotta say!

7 0
3 years ago
Read 2 more answers
How would you print from 1 to 1000
Hitman42 [59]

Answer:

There are two ways to print 1 to 1000

  1. Using Loops.
  2. Using Recursion.

Explanation:

Using loops

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

{

  cout<<i<<" ";

}

Using recursion

Remember you can implement recursion using a function only.

void print(int n)

{

  if(n==0)

  return;

  print(n-1);

  cout<<n<<" "';

}

you should pass 1000 as an argument to the function print.

5 0
3 years ago
What word describes a violation of copyright laws? What rights do copyright holders have over their work of art
lesya [120]

breech

malefaction

misdoing

offence

transgression

8 0
3 years ago
Read 2 more answers
Other questions:
  • What might be the best response to a cyberbuly attack
    6·2 answers
  • Why was the term personal computer created?
    5·1 answer
  • Look up and list the number of a local taxi or car service in your community. Include the company name and telephone number.
    13·1 answer
  • Cyberterrorism is the use of terrorism to attack (Points : 1) public libraries. computer based networks. government spy networks
    15·1 answer
  • What is the first step that you have to perform before you can add a windows package to a wim file?
    9·1 answer
  • When writing research questions, use action words, such as
    6·2 answers
  • I made Pico with a Ray Gun (Next is Dad/Tankman)<br><br> Opinons?
    11·2 answers
  • Please need help.... The system development process is called a cycle. Which of the following may be an ongoing process which su
    6·1 answer
  • What would be the best tool to display the following information from a basketball game?
    6·1 answer
  • Jonah wants to type an assignment using Word. Arrange the steps he needs to follow in the correct order.?
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!