# Create a list with the names of your group members as string literals. It should...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
# Create a list with the names of your group members as string literals. It should look similar to example_listl. group members = [] # YOU FILL THIS IN print("My group members are: ") print (group_members) # Now try creating a list with variables instead of literals, similar to how we defined x, y, and z in the cell above. group member1 = "¹ " group member2 = '' group member3 = group member4 = 11 group members = [] # YOU FILL THIS IN # Use indexing to print your own name from group members. The output should look like: I am John Smith print(¹) # YOU FILL THIS IN group members are: Let's look at how lists can be updated. Using the list in the next code box, we can update the values with the following methods. #use this list! elements_list = ["earth", "air", "fire", "water"] Replacing: Replace a value at index i by overwriting the variable assignment. In the next code box, replace "fire" with "lightning" and output the resulting list. Hint: Use the index function to find where the string is in the list and then use the [] notation to access and replace the value at that index. This frees you from finding the index manually. # Replace fire with lighting here. Be sure to run the code cell above to have elements_list defined # so that it can be recognized by your code. # Create a list with the names of your group members as string literals. It should look similar to example_listl. group members = [] # YOU FILL THIS IN print("My group members are: ") print (group_members) # Now try creating a list with variables instead of literals, similar to how we defined x, y, and z in the cell above. group member1 = "¹ " group member2 = '' group member3 = group member4 = 11 group members = [] # YOU FILL THIS IN # Use indexing to print your own name from group members. The output should look like: I am John Smith print(¹) # YOU FILL THIS IN group members are: Let's look at how lists can be updated. Using the list in the next code box, we can update the values with the following methods. #use this list! elements_list = ["earth", "air", "fire", "water"] Replacing: Replace a value at index i by overwriting the variable assignment. In the next code box, replace "fire" with "lightning" and output the resulting list. Hint: Use the index function to find where the string is in the list and then use the [] notation to access and replace the value at that index. This frees you from finding the index manually. # Replace fire with lighting here. Be sure to run the code cell above to have elements_list defined # so that it can be recognized by your code.
Expert Answer:
Answer rating: 100% (QA)
Heres the corrected code with instructions Create a list with the names of your group members as string literals groupmembers John Sara David Emily pr... View the full answer
Related Book For
Posted Date:
Students also viewed these computer engineering questions
-
Create a class called Heater, that contains four fields, temperature, increment, max and min, all of whose type is double. Make sure you write a description of your new Class in the comments, with...
-
Create a class named Aircraft Each Aircraft contains a model code, number of seats, and sale price Model code can be 3, 7, or 8 If the model code is 3, the number of seats is 200, and the sale price...
-
Create a class that stores an array of usable error messages save the file as Data Messages java Create a Data Exception class each object of this class will store one of the messages Save the file...
-
Kyoko is a hard-working college sophomore. One Thursday, she decides to work nonstop until she has answered 220 practice problems for her physics course. She starts work at 8:00 AM and uses a table...
-
Some income from capital is taxed twice. Explain.
-
Evaluate the expression. -|4/7|
-
The current market interest rate on U-Store City Investment Building bonds is $10 \%$, compounded semiannually. The original bonds are sold as $\$ 1,000,12 \%$ interest rate notes. A batch of bonds...
-
Mr. Fresser, age 67, owns 80% of the common shares of Fresser Ltd., a CCPC. The other 20% is owned by his daughter, Elana, who has worked in the business with Mr. Fresser for the past 22 years. When...
-
Sage Inc. experienced the following transactions for Year 1, its first year of operations: 1. Issued common stock for $100,000 cash. 2. Purchased $195,000 of merchandise on account. 3. Sold...
-
Conduct a Pareto analysis for the number of minutes that flights are late in the accompanying data. Interpret the results. E Click the icon to view the Atlanta Airline Data. Conduct a Pareto analysis...
-
Sulphur burns in air to form sulphur (IV) oxide. A simple energy level diagram for the reaction is given below. Study the diagram and answer the questions the follows Enerav S. + O2 (g) (g) AH SH...
-
Suppose a user employs one-time passwords as above (or, for that matter, reusable passwords) but that the password is transmitted sufficiently slowly. (a) Show that an eavesdropper can gain access to...
-
For the network in Figure 3.51, suppose the forwarding tables are all established as in Exercise 44 and then the CE link fails. Give: (a) the tables of A, B, D, and F after C and E have reported the...
-
Design a simple UDP-based protocol for retrieving files from a server. No authentication is to be provided. Stop-and-wait transmission of the data may be used. Your protocol should address the...
-
Each switch chose the VCI value for the incoming link. Show that it is also possible for each switch to choose the VCI value for the outbound link and that the same VCI values will be chosen by each...
-
Suppose TCP were to be used as the underlying transport in an RPC protocol; each TCP connection is to carry a sequential stream of requests and replies. What analog, if any, would TCP have for: (a)...
-
Q3. Let C. be a positive real number, Consider the following two functions. f: [-3, ) R f(x) = C-x 2 g: (-, 6]IR, g(x) = x +C. T Find all values of C for which both (fog)(x) and (gof)(x) exists. (8...
-
Players A, B, and C toss a fair coin in order. The first to throw a head wins. What are their respective chances of winning?
-
Sunshine Seashore Supplies rents beach equipment such as kayaks, canoes, beach chairs, and umbrellas to tourists. Write a program that prompts the user for the number of minutes the user rented a...
-
a. Yummy Catering provides meals for parties and special events. Write a program that displays Yummy Caterings motto, which is Yummy makes the food that makes it a party. Save the file as...
-
Write a program that creates an Integer Array List and store at least four integers in it. Use an iterator to display all the numbers. Then prompt the user for a value to remove from the list. If the...
-
Describe a job in which you think an employee recognition program might be an effective means for changing and improving employee behaviour. Explain how you would design the program and how you would...
-
Describe a situation in which you think an employer could use organizational behaviour modification and an employee recognition program to improve or correct employee behaviour. Can you anticipate...
-
A supervisor in a textile factory observes that one of her employees is violating a safety rule that could result in severe injury. What combination of reinforcement, punishment, and extinction could...
Study smarter with the SolutionInn App