answer.
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]
1 year 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]1 year 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
The __________ vulnerability assessment is a process designed to find and document selected vulnerabilities that are likely to b
forsale [732]
The risk vulnerability assessment is the answer
5 0
2 years ago
When you examine a computer chip under a microscope, what will you see?
ELEN [110]
<span>When you examine a computer chip under a microscope,  you will see </span>integrated circuits.
5 0
2 years ago
Write a method called makeStars. The method receives an int parameter that is guaranteed not to be negative. The method returns
serious [3.7K]

Answer:

// import the Scanner class

// to allow the program receive user input

import java.util.Scanner;

// The class Solution is defined

public class Solution{

   // main method to begin program execution

   public static void main(String[] args) {

       // scanner object scan is declared

       Scanner scan = new Scanner(System.in);

       // Prompt the user to enter a number

       System.out.println("Enter the number of stars you want: ");

       // user input is assigned to numOfStar

       int numOfStar = scan.nextInt();

       // call the makeStars method

       makeStars(numOfStar);

   }

   

   // makeStars method print stars using recursion

   // the method call itself till starNum == 0

   public static void makeStars(int starNum){

       if (starNum != 0){

           System.out.print("*");

           makeStars(starNum -1);

       }

   }

}

Explanation:

The code is well comment and solve the problem using recursion.

6 0
2 years ago
Information is stored on a compact disk in a coded pattern of tiny pits arranged in a track that spirals outward toward the rim
Maksim231197 [3]

Answer:

(i) The rotation speed must stay the same.

(ii) The rotation speed must increase.

(iii) The rotation speed must decrease.

Explanation:

According to Equation

10.10, the angular speed must therefore vary as the laser–lens system moves

radially along the disc. In a typical CD player, the constant speed of the surface at

the point of the laser–lens system is 1.3 m/s.

5 0
1 year ago
It has been said that the quality of our relationships depends in large part on the quality of our
timurjin [86]

Answer:

people

Explanation:

6 0
2 years ago
Other questions:
  • Email, instant messaging and most web traffic go across the internet in the clear; that is, anyone who can capture that informat
    15·2 answers
  • If a car's is malfunctioning, people in the car will become ill when driving long distances, especially if the windows are close
    6·2 answers
  • Jacob wants to be a Steamfitter. He just finished his associate’s degree. Which best describes what he should do next?
    10·2 answers
  • A slide contains three text boxes and three images that correspond to the text boxes. Which option can you use to display a text
    5·2 answers
  • Susie works for an architectural firm and the partners have always drawn the plans for projects by hand. Though Susie learned ho
    11·1 answer
  • In a system containing CPU 1 and Disk Drive A, the system is instructed to access Track 1, Track 9, Track 1, and then Track 9 of
    12·1 answer
  • Assume that getPlayer2Move works as specified, regardless of what you wrote in part (a) . You must use getPlayer1Move and getPla
    14·1 answer
  • Performing binary search on an unsorted list will always return the correct answer in O(n) time where n is the length of the lis
    9·1 answer
  • Write an expression that continues to bid until the user enters 'n'.
    9·1 answer
  • Write a MATLAB function named average_of_scores_with_drops The function will have two inputs and two return values. The first in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!