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
Alisiya [41]
3 years ago
9

Modify a list Modify short_names by deleting the first element and changing the last element to Joe. Sample output with input: '

Gertrude Sam Ann Joseph' ["Sam', 'Ann', 'Joe'l 1 user_input = input() 2 short names = user input.split() 3 short_names - short_names.pop(0) 6 print (short_names) based
Computers and Technology
1 answer:
fredd [130]3 years ago
3 0

Answer:

The modified program is as follows:

user_input = input()

short_names = list(user_input.split(" "))

short_names.pop(0)

short_names[-1] = "Joe"

print(short_names)

Explanation:

This gets the user input

user_input = input()

This converts input to list

short_names = list(user_input.split(" "))

This removes the first item of the list

short_names.pop(0)

This updates the last item to "Joe"

short_names[-1] = "Joe"

This prints the updated list

print(short_names)

You might be interested in
Which storage con be used<br>as permanent storage<br>a) Rom<br>6) RAM, © main memery​
Veseljchak [2.6K]

Answer:

ROM

Explanation:

Data in ROM does not erase itself when the computer is shut down. The data is permentely written and stored.

4 0
3 years ago
A variable like user_num can store a value like an integer. Extend the given program as indicated. Output the user's input. (2 p
lapo4ka [179]

Answer:

The answer to this question is given below in the explanation section. It is noted that this program is written in C++ using online C++ compiler.

Explanation:

#include <iostream>

using namespace std;

int squared(int num)// this is the function to compute square

   {

       return num*num;

   }

int cube(int num)// this is the function to compute cube

   {

       return num*num*num;

   }

int main()

{

   int user_num, user_num2; // variable declaration

   

       cout<<"Enter the first number: ";//prompt user to enter the number

       cin>>user_num;//store the user entered number into variable

       cout<<"\nEnter the second number: ";//prompt the user to enter the second number

       cin>>user_num2;//store the user entered number into variable

   

   

   cout<<"\nSquared of first number is: "<<squared(user_num);//compute square of user_num and display

   cout<<"\nCube of first number is: "<<cube(user_num);//compute the cube of the user_num and display

   cout<<"\nSquare of second number is: "<<squared(user_num2);//compute the square of user_num2 and display

   cout<<"\nCube of second number is: "<<cube(user_num2);//compute the cube of user_num2 and display

   

   cout<<"\nSum of number 1 and number 2 is: "<<user_num2 + user_num2;//display the sum of user_num2 and user_num

   cout<<"\nProduct of number 1 and number 2 is: "<<user_num2 * user_num;//display the product of user_num and user_num2

   

   

   return 0;//terminate the program

}

                               

7 0
4 years ago
Hiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii
Marianna [84]

Answer:

hello

Explanation:

how are you?

7 0
3 years ago
Can the police track a phone if you post something on a social media platform even if the SIM card is out and location services
IgorLugansk [536]
Yes by using the internet address
6 0
3 years ago
Read 2 more answers
: Chronic state of ____________________, unrealistic &amp; excessive worry about two or more life ____________________
suter [353]

The Chronic state of  generalized anxiety disorder is an unrealistic and excessive worry about two or more life that  last for at least six months.

<h3>What disorder is chronic worry?</h3>

Generalized Anxiety Disorder, GAD, is known to be a form of an anxiety disorder that is known by:

  • chronic anxiety
  • exaggerated worry
  • tension and others.

Note that it is also called an excessive or unrealistic worry in regards to life circumstances that is said to occur for about at least six months.

Hence, The Chronic state of  generalized anxiety disorder is an unrealistic and excessive worry about two or more life that  last for at least six months.

Learn more about Generalized Anxiety Disorder from

brainly.com/question/22676443

#SPJ1

6 0
2 years ago
Other questions:
  • Which member of the restaurant and food/beverage service career is mostly likely to plan menus and direct worker
    6·2 answers
  • One of the most toxic components of a computer is the
    11·1 answer
  • Match each invention with its effects on the age of exploration.
    6·2 answers
  • You are designing a wireless network for a client. Your client needs the network to support a data rate of at least 54Mbps. In a
    11·1 answer
  • Consider an environment in which there is a one-to-one mapping between user-level threads and kernel-level threads that allows o
    7·1 answer
  • Java: Literal representing the true value ? In java, what is the literal that represents a true value ?
    6·1 answer
  • To do a good job of searching periodicals at your library, you should use A) the Library of Congress Authorities webpage. B) web
    10·1 answer
  • Suppose you own a travel agency in a large city. You have many corporate clients, but growth has slowed somewhat Some long-term
    15·1 answer
  • What is one pass of a coding sequence called?​
    13·2 answers
  • Algorithm to calculate the area of a square.​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!