Question: answers question 2 and 3. please have the simplest coding for these problems credit for asking and answering questions in Moodle. Read Chapter 10 (Lists)

 answers question 2 and 3. please have the simplest coding for

answers question 2 and 3. please have the simplest coding for these problems

credit for asking and answering questions in Moodle. Read Chapter 10 (Lists) in the textbook. You may skip the sections Map, Filter and Reduce; and List Arguments. Read the first two sections of Chapter 11 (Tuples): Tuples Are Immutable and Tuple Assignment. 1. This question practices the use of a list method. Assign to the variable grades a list of 10 letter grades from among 'A', 'B, 'C', 'D', and'F'. For example, 2. grades ['A, F, 'C, 'F, 'A, 'B', 'A, C, 'A', 'B'] Write a Python expression that creates a list named frequency, in which the elements are the number of times each of the letters A, B, C, D and F appear in grades. For example, for the above value of grades, the following would be correct output frequency [4, 2, 2, 0, 2] Your expression must give the correct values for any list of grades, not just the one in your list. Hint: use the list method count. 3. This question practices list membership, list indexes and list slices A. Write a Python statement that creates a list named dog breeds that contains the elements B. Write a Python statement that uses list slicing to create a list herding_ dogs that is made up of the first two elements of dog breeds. C. Write a Python statement that uses list indexing to create a list tiny-dogs that is made up of the last element of dog breeds D. Write a Python statement that tests whether Persian' is in the list dog breeds and prints either True or False depending on the answer. ret F10 5 6 7 8 9

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!