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
zhannawk [14.2K]
3 years ago
10

Modify short_names by deleting the first element and changing the last element to Joe. Sample output with input: 'Gertrude Sam A

nn Joseph'

Computers and Technology
1 answer:
notka56 [123]3 years ago
6 0

Answer:  

I am writing a Python program:

For taking input from user:

user_input = input() # takes input from user

short_names = user_input.split() #splits user_input into list of strings

short_names.pop(0) # removes the first element of the list i.e. Gertrude

short_names[-1] = "Joe" #sets the last element to Joe

print(short_names)    #prints modified list of Sam Ann Joe

If you do not want to take input from user:  

short_names=['Gertrude', 'Sam', 'Ann', 'Joseph']  #list of 4 elements

short_names=short_names[1:]  # removes the first element Gertrude

short_names.pop()  # removes last element i.e. Joseph from list

short_names.append('Joe')  #adds Joe to the end of the list

print(short_names) #prints modified list Sam Ann Joe

If you do not want to use pop() and append() methods:

short_names = ['Gertrude', 'Sam', 'Ann', 'Joseph']  #creates list of 4 values

short_names = short_names[1:]  # removes first value i.e. Gertrude from list

short_names[-1] = "Joe"  #set the last element to Joe

print(short_names) #prints modified list Sam Ann Joe

Explanation:

The first program takes the names from the user, splits them into list of strings, then pop(0) has given index value 0 which means 1st value in the list. So it removes and returns first value from the list. Next statement sets the last value of list to Joe.

The second program has a hard coded list ['Gertrude', 'Sam', 'Ann', 'Joseph']  

short_names = short_names[1:] removes the first value of the short_names list i.e. Gertrude. Next pop() removes and returns last value in the list i.e. Joseph from list. Last statement append('Joe') adds Joe to the end of the list.

The third program has a list of 4 elements. short_names = short_names[1:]   removes first value i.e. Gertrude from list and short_names[-1] = "Joe"  sets the last element to Joe.

You might be interested in
As u type where does excel display the entry
grigory [225]

Answer:

The Active cell inside Excel Worksheet is used to identify the cell which is currently active. The thick border gridlines around the cell indicates that it is the Active cell inside Excel Worksheet. The Active cell is where the focus is on and where the data will be entered when a key is typed on keyboard.

5 0
3 years ago
All about wide area network<br>​
andreev551 [17]

Answer:

a wide area network is also known as (WAN) it is a large information that has been tied to more than a single location you can understand by the diagram shown you can think of it as a network sharing information around the world

6 0
3 years ago
Imagine you're in charge of managing an annual fest at your school. You have to select students and assign them different tasks.
kenny6666 [7]

Answer:

Quality traits are important in many ways. A persons traits identifies them of how they treat you or how you might treat them. It is important to find good working people for the job. For example if one student is good at a specific task I might put them in that task or if another is good at stocking shelves or finding books I might put them in the library to help students find books. It is important as a supervisor to find people that listen and follow instructions not people that mess around and are unorganized. These qualities and traits are important to see the real potential of the employees. Finding the right people for the job will help the school and you as the supervisor to manage these employees. Making a application or employment sheet will help to find the right people making a sheet with some questions and have the potential employees fill it out to find their traits and skills.

Explanation:

Sorry I didn't have much background information on what you wanted me to write hope this works you can edit and change stuff though.

Also run this through Grammarly's plagiarism tester to see if it is plagiarism!

5 0
3 years ago
What level of access can a subapplication owner provide to another egrants user in the same organization who has been authorized
Oduvanchick [21]

The view/print privileges is the level of access can a subapplication owner provide to another egrants user in the same organization who has been authorized view/print access for other subapplications.

<h3>What is a Subapplicant?</h3>

Subapplicant is known to be a term that connote a State agency, or a community, that is said to be submitting a subapplication to the applicant and this is one that is often used as a source of aid under the FMA program.

Note that Upon grant award, the subapplicant is seen as the subrecipient and thus, The view/print privileges is the level of access can a subapplication owner provide to another egrants user in the same organization who has been authorized view/print access for other subapplications.

Learn more about subapplication from

brainly.com/question/14400492

#SPJ1

8 0
2 years ago
Which osi/iso layer is responsible for determining the best route for data to be transferred?
RSB [31]
TCP/IP, (I believe) layer 3 is the only layer with a concept of networks and routing.
3 0
3 years ago
Other questions:
  • Which description best describes how mass spectroscopy is useful in the field of forensic toxicology
    6·1 answer
  • Nina is trying to learn more about how computers work. She has repeatedly read that the motherboard is the "brain” of the comput
    9·2 answers
  • _____ refers to the physical components used to collect, store, organize, and process data and to distribute information
    7·1 answer
  • Once a graph has been created, you would need to start over to make any changes to it?
    5·1 answer
  • Word processing software programs can run on smartphones.<br> True<br> Or <br> False
    6·1 answer
  • Refer to the exhibit. A network security analyst is using the Follow TCP Stream feature in Wireshark to rebuild the TCP transact
    8·1 answer
  • BRAINLIEST You have a small company and want to keep your costs low, but it is important your employees share data. Which networ
    13·2 answers
  • HELP ASAP <br>please will mark brainliest<br>​
    5·2 answers
  • WILL GIVE BRAINLIEST!!!!
    14·2 answers
  • How does lower latency benefit the users connected to a network?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!