CHALLENGE 7.1.1: Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output for 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])

Answers

Answer 1
Answer:

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)


Related Questions

Create an application named TestSoccerPlayer that instantiates and displays a SoccerPlayer object. The SoccerPlayer class contains the following properties: Name - The player’s name ( a string) JerseyNum - The player's jersey number (an integer) Goals - Number of goals scored (an integer) Assists - Number of assists (an integer)
To define constructors and member functions outside of a class's original scope, the operator can be used.
Define a function that takes two arguments: a string called strText and a number called intNumber. This function will use a repetition structure (a While or For loop) to print strText intNumber of times. Call this function.
Given a String variable named sentence that has been initialized, write an expression whose value is the number of characters in the String referred to by sentence.
Write a c++ program to find; (I). the perimeter of rectangle.(ii). the circumference of a circle.Note: (1). all the programs must allow the user to make his input .(2).both programs must have both comment using the single line comment or the multiple line comment to give description to both programs.​

Kara's teacher asked her to create a chart with horizontal bars. Which chart or graph should she use?Bar graph
Column chart
Line graph
Pie chart

Answers

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct answer to this question is the Bar graph.

Because we use this chart type to visually compare values across a few categories when the charts show duration or when the category text is long.

However, we can present information similarly in the bar graph and in column charts, but if you want to create a chart with the horizontal bar then you must use the Bar graph. In an Excel sheet, you can easily draw a bar graph and can format the bar graph into a 2-d bar and 3-d bar chart.

A column chart is used to compare values across a few categories. You can present values in columns and into vertical bars.

A line graph chart is used to show trends over months, years, and decades, etc.

Pie Chart is used to show a proportion of a whole. You can use the Pie chart when the total of your numbers is 100%.

Answer:

Bar graph option A

Explanation:

I did the test

In this project you will write a set of instructions (algorithm). The two grids below have colored boxes in different locations. You will create instructions to move the colored boxes in grid one to their final location in grid two. Use the
example to help you. The algorithm that you will write should be in everyday language
(no pseudocode or programming language). Write your instructions at the bottom of the
page.
Example: 1. Move
the orange box 2
spaces to the right.
2. Move the green
box one space
down. 3. Move the
green box two
spaces to the left.
Write your instructions. Review the rubric to check your final work.
Rules: All 6 colors (red, green, yellow, pink, blue, purple) must be move to their new location on the grid. Block spaces are
barriers. You cannot move through them or on them – you must move around them

Answers

Answer:

Explanation:

Pink: Down 5 then left 2.

Yellow: Left 3 and down 2.

Green: Right 7, down 4 and left 1.

Purple: Up 6 and left 9.

Red: Left 7, down 5 and left 1.

You can do the last one, blue :)

Answer:

Explanation:

u=up, d=down, r=right, l=left

yellow: l3d2

pink: d5l2

green: r7d4l1

purple: u6l9

red: l7d5l1

blue: r2u7l5

Write a function named minMax() that accepts three integers arguments from the keyboard and finds the smallest and largest integers. Include the function minMax() in a working program. Make sure your function is called from main().Test the function by passing various combinations of three integers to it.

Answers

Answer:

public class Main

{

public static void main(String[] args) {

 minMax(1, 2, 3);

 minMax(100, 25, 33);

 minMax(11, 222, 37);

}

public static void minMax(int n1, int n2, int n3){

    int max, min;

    if(n1 >= n2 && n1 >= n3){

        max = n1;

    }

    else if(n2 >= n1 && n2 >= n3){

        max = n2;

    }

    else{

        max = n3;

    }

   

    if(n1 <= n2 && n1 <= n3){

        min = n1;

    }

    else if(n2 <= n1 && n2 <= n3){

        min = n2;

    }

    else{

        min = n3;

    }

    System.out.println("The max is " + max + "\nThe min is " + min);    

}

}

Explanation:

*The code is in Java.

Create a function named minMax() that takes three integers, n1, n2 and n3

Inside the function:

Declare the min and max

Check if n1 is greater than or equal to n2 and n3. If it is set it as max. If not, check if n2 is greater than or equal to n1 and n3. If it is set it as max. Otherwise, set n3 as max

Check if n1 is smaller than or equal to n2 and n3. If it is set it as min. If not, check if n2 is smaller than or equal to n1 and n3. If it is set it as min. Otherwise, set n3 as min

Print the max and min

Inside the main:

Call the minMax() with different combinations

What is a software? 2 sentences please, I'll mark u as brailiest

Answers

Answer:

Computer software, or simply software, is a collection of data or computer instructions that tell the computer how to work. This is in contrast to physical hardware, from which the system is built and actually performs the work.

Explanation:

List two reasons why “buying a computer is no easy task” ?

Answers

The price of it and the quality of it.

Price also important matter all computer users needs are not equal so we should concern requirement features

Which vendor did IBM select to create the operating system for the IBM PC?

Answers

The Answer Is: "Microsoft".