Question

Let Friends = [ ’John’, ’Jane’, ’Mike’, ’Mika’, ’Neil’, ’Neela’]. Write a one-line expression which replaces...

Let Friends = [ ’John’, ’Jane’, ’Mike’, ’Mika’, ’Neil’, ’Neela’]. Write a one-line expression which replaces ’Mike’ by ’Matt’ in the list Friends.

use matcha is possible


do in phyton

Homework Answers

Answer #1

The answer to this question is as follows:

The code is as follows:

Friends=['John','Jane','Mike','Mika','Neil','Neela']
Friends[Friends.index('Mike')] = 'Matt'
print(Friends)

The input and output are provided in the screenshot below:

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
CASE FACTS Mike and Jane Cool are married and file a joint Federal income tax return....
CASE FACTS Mike and Jane Cool are married and file a joint Federal income tax return. Both are under 50 years old. Mike’s social security number is 999-88-7777. Jane’s is 888-77-6666. They live at 234 Freedom Boulevard, Cedar City, UT 84720. Neither is interested in contributing to the Presidential Election Campaign. Mike is a city engineer. His W-2 showed wages of $85,000, Federal income tax withheld of $7,500 and state income tax withheld of $3,000. Mike does not participate in...
Let s be a string that contains a simple mathematical expression, e.g., s = '1.5 +...
Let s be a string that contains a simple mathematical expression, e.g., s = '1.5 + 2.1-3' s = '10.0-1.6 + 3 - 1.4' The expression will have multiple operands. We don't know exactly how many operands there are in s. The operator will be one of the following: +, -. Write a function called plus_minus() that takes s as the input, interpret the expression, then evaluate and return the output. Note: The use of the eval() is not allowed...
Project File Processing. Write a program that will read in from input file one line at...
Project File Processing. Write a program that will read in from input file one line at a time until end of file and output the number of words in the line and the number of occurrences of each letter. Define a word to be any string of letters that is delimited at each end by either whitespace, a period, a comma or the beginning or end of the line. You can assume that the input consists entirely of letters, whitespaces,...
Consider John Allen Lee's styles of love. Which one do you think you are? What do...
Consider John Allen Lee's styles of love. Which one do you think you are? What do you think your partner should be to give that budding relationship a good chance? And when that relationship really gets going, and you've got your first fight, how are you going to establish a solid foundation for effective communication? What are the warning signs that this relationship is about to fail? How do you stop it? I recommend that you use a single example...
John is the CFO of company A and one of his recent tasks is to borrow...
John is the CFO of company A and one of his recent tasks is to borrow $10 million for 3 years to fund the company’s newly initiated project. Due to the pattern of expected cash flows generated from the to-be-funded project, John wants to have a loan with a fixed rate. He called his banks and received quotes on fixed rate 8.0% and floating rate 0.5% above the LIBOR.  All rates are annualized rate in quarterly compounding. John passes this information...
Q1) Write a Python function partial_print, which takes one parameter, a string, and prints the first,...
Q1) Write a Python function partial_print, which takes one parameter, a string, and prints the first, third, fifth (and so on) characters of the strings, with each character both preceded and followed by the ^ symbol, and with a newline appearing after the last ^ symbol. The function returns no value; its goal is to print its output, but not to return it. Q2) Write a Python function called lines_of_code that takes a Path object as a parameter, which is...
About John Daniels Chemicals Inc. This business case is about John Daniels Chemicals Inc., which is...
About John Daniels Chemicals Inc. This business case is about John Daniels Chemicals Inc., which is one the most respected and elite chemical research organization in the industry, operating since 1991, with the headquarters in Tanzania, Africa. Organizational Structure and Culture at John Daniels Chemicals Inc. Organizational culture in John Daniels Chemicals Inc. is an open and less rigid one, unlike the other usual corporations in the market. The scientists selected to work in John Daniels Chemicals Inc. are top...
Write a program that reads in a line consisting of a student’s name, Social Security number,...
Write a program that reads in a line consisting of a student’s name, Social Security number, user ID, and password. The program outputs the string in which all the digits of the Social Security number and all the characters in the password are replaced by x. (The Social Security number is in the form 000-00-0000, and the user ID and the password do not contain any spaces.) Your program should not use the operator [] to access a string element....
***This is a complete question. Do not tag this as incomplete. Write SQL queries to the...
***This is a complete question. Do not tag this as incomplete. Write SQL queries to the below Relational Database. • Regarding the SQL queries: • Do not use SELECT * in any query. • Do not use any SQL features (including Nullif) that were not covered in this course. • Do not use subqueries IF joins can be used to answer a question. However, some questions may require the use of subqueries. The Movie Database Notes: TheaterNum, MovieNum, and ActorNum...
36. When John comes home from work one evening, he finds that the leaves in his...
36. When John comes home from work one evening, he finds that the leaves in his front yard have been raked and put in bags. Later, a man comes to collect for the yard work done. John refuses to pay for the work since he has never seen the man before and did not hire him to do his yard work. Which of the following answers is most accurate? a. This is an implied, unilateral contract and John must pay...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT