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
I accidentally pressed the challenge button while I was scrolling through. I didn't mean to press that challenge, instead of the
kondor19780726 [428]

Answer:

Can u pls answer my questions I’m so stuck and I need them by tmrw or today pls I don’t know how to get ahold of u

Explanation:

5 0
4 years ago
Read 2 more answers
When encountering another vessel in darkness or reduced visibility, what do visible red and green lights indicate
mina [271]
The sides of the vessel.
5 0
4 years ago
What are the risks of logging into a system routing as “root” or some other administrative identity?
Elena L [17]
"Root" in Linus is the the same as Administrator in Windows.
When you log into a system with identity "root" this means that you have administrative privileges (you are not simple user of the system and application). The risk is that as a "Root" you have the authority to make changes in the system and maybe harm the system if you don't know exactly what you are doing.
5 0
4 years ago
If you’re torn between more than one option while making a decision, which of the following would most likely be the best strate
Vladimir [108]
<span>If you’re torn between more than one option while making a decision, which of the following would most likely be the best strategy to help you decide you should get rid of the bad ones and you will be left with good ones 

</span>
3 0
3 years ago
Write a program to prepare the monthly charge account statement for a customer of CS CARD International, a credit card company.
WITCHER [35]

Answer:

import java.util.*;

import java.text.*;

class CreditCardBill

{

public static void main(String[] args)

{

Scanner sc = new Scanner(System.in);

NumberFormat defaultFormat = NumberFormat.getCurrencyInstance(Locale.US);

System.out.println("CS Card International Statement");

System.out.println("===============================");

System.out.print("Previous Balance: $");

double prevBalance = sc.nextDouble();

System.out.print("Additional Charges: $");

double addCharges = sc.nextDouble();

double interest;

if(prevBalance == 0)

interest = 0;

else

interest = (prevBalance + addCharges) * 0.02;

System.out.println("Interest: "+defaultFormat.format(interest));

double newBalance = prevBalance + addCharges + interest;

System.out.println("New Balance: "+defaultFormat.format(newBalance));

double minPayment;

if(newBalance < 50)

minPayment = newBalance;

else if(newBalance <= 300)

minPayment = 50.00;

else

minPayment = newBalance * 0.2;

System.out.println("Minimum Payment: "+defaultFormat.format(minPayment));

}

}

5 0
3 years ago
Other questions:
  • Prompt the user for an automobile service. Each service type is composed of two strings. Output the user's input. (1 pt) Ex: Ent
    9·1 answer
  • Write a dialogue between two friends who are debating on popularity or property​
    6·1 answer
  • What is required for real-time surveillance of a suspects computer activity?/p Group of answer choices a. Blocking data transmis
    12·1 answer
  • Error: 404 Not Found <br>The resource that you requested does not exist on this server.
    14·2 answers
  • Mencione algunos ejemplos en donde sean utilizadas las máquinas de aire comprimido. Justifique su respuesta.
    7·1 answer
  • Importancia de la química en la vida cotidiana​
    15·1 answer
  • Write the code for the following problem.
    9·1 answer
  • select the correct answer from each drop-down menu. “To clean a computer screen, use ___. To clean a keyboard, use a ___.”
    7·1 answer
  • PLS HELP
    8·2 answers
  • Consider the following method:
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!