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
lorasvet [3.4K]
2 years ago
9

Initialize the list short_names with strings 'Gus', 'Bob', and 'Zoe'. Sample output for the given program:

Computers and Technology
1 answer:
ohaa [14]2 years ago
7 0

Answer:

Following are the correct code to this question:

short_names=['Gus','Bob','Zoe']#defining a list short_names that holds string value

print (short_names[0])#print list first element value

print (short_names[1])#print list second element value

print (short_names[2])#print list third element value

Output:

Gus

Bob

Zoe

Explanation:

  • In the above python program code, a list "short_names" list is declared, that holds three variable that is "Gus, Bob, and Zoe".
  • In the next step, the print method is used that prints list element value.
  • In this program, we use the list, which is similar to an array, and both elements index value starting from the 0, that's why in this code we print "0,1, and 2" element value.
You might be interested in
In addition to being fun, another reason that people have been creating games ever since they settled into communities is:
aleksklad [387]

Answer:

I am pretty sure it's D. to teach strategy and critical thinking.

6 0
2 years ago
Read 2 more answers
Write a recursive function that calculates if two binary trees are similar?
ahrayia [7]

Answer:

bool identicaltrees(Node* root1,Node* root2)//function of type boolean true if idenctical false if not.

{

   if(root1==NULL&&root2==NULL)//both trees are null means identical.

   return true;

   if(roo1 && root2)

   {

       if(root1->data==root2->data)//condition for recursive call..

       {

           return (identicaltrees(root1->left,root2->right)&&identicaltrees(root1->right&&root2->right);

       }

   }

   else

   return false;

}

Explanation:

In this function it of type boolean returns true if both the trees are identical return false if not.First we are checking root node of both the trees if both are null then they are identical returning true.

If both root nodes are not null then checking their data.If data is same then recursively traversing on both trees and checking both trees.

else returning false.

5 0
3 years ago
Snap Me on <br>samxavier.18​
Ahat [919]

Answer:no thank you ima goody

Explanation:

7 0
2 years ago
Read 2 more answers
What does the use of color and images on a blog refer to?
serious [3.7K]
I think marketing and branding. i dont think this is 100% correct
8 0
3 years ago
Read 2 more answers
What defines which part of the IP address is the Network ID and the Host ID?
Brilliant_brown [7]

Answer:

Subnet Mask

Explanation:

Literally the answer.

5 0
2 years ago
Read 2 more answers
Other questions:
  • Suppose that, even unrealistically, we are to search a list of 700 million items using Binary Search, Recursive (Algorithm 2.1).
    11·1 answer
  • Where do today's computers store almost all motherboard configuration data?
    15·1 answer
  • Dr. Laos gets a referral for a 6 month old who has become listless and stopped eating lately. Her pediatrician wanted her to be
    15·1 answer
  • Software that helps run the computer's hardware devices and coordinates instructions between applications is called
    10·1 answer
  • George, a user, has contacted you to complain that his issue has not been resolved. He has already contacted your department twi
    9·1 answer
  • Which of the following are points that can demonstrate the accuracy of a website?
    6·1 answer
  • Consider the following recurrence, defined for n a power of 4 (for the time of some algorithm): T(n) = 3 if n = 1 2T(n/4) + 4n +
    10·1 answer
  • The information provided in text aids can help us to understand a text’s content before we even read it.
    8·1 answer
  • Which of the following statements best reflects the pros and cons of overtime potential for a line installer or repairer?
    15·1 answer
  • HELPPPP MEEEE!!!!! ITS LIFE OR MUERTEEE
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!