Python 2D Lists 8
Use the index() function to locate the position of a film of your choice. When you are satisfied with your code, copy and paste it below, then submit your solution.
Use the index() function to locate the position of a film of your choice. When you are satisfied with your code, copy and paste it below, then submit your solution.
Use the sort() function to sort the list into alphabetical order. When you are satisfied with your code, copy and paste it below, then submit your solution.
Append a new film and score to the 2D list. When you are satisfied with your code, copy and paste it below, then submit your solution.
Create a FOR loop that will loop through the 2D list, printing out only the name of each film, on its own line. When you are satisfied with your code, copy and paste it below, then submit your solution.
Create a FOR loop that will loop through the 2D list, printing out each sub list (film and score) onto its own line. When you are satisfied with your code, copy and paste it below, then submit your solution.
Using the completed 2D list from task 1, write the code that will print the 4th film’s score. When you are satisfied with your code, copy and paste it below, then submit your solution.
Using the completed 2D list from task 1, write the code that will print the 3rd film in your list and its score. When you are satisfied with your code, copy and paste it below, then submit your solution.
Create (and then display) a 2D list that contains your 5 favourite films, along with your rating for that film, out of 10. For example films = [[“Back to the Future”, “10/10”],[“Back to the Future 2”, “9/10”],…] When you are satisfied with your code, copy and paste it below, then submit your solution.
“Pop” out each item out of your list in turn and each time display the film which has been popped out. Do this until your list contains nothing. When you are satisfied with your code, copy and paste it below, then submit your solution.
Use the ‘insert’ function to insert a new favourite film into a particular position of the list. When you are satisfied with your code, copy and paste it below, then submit your solution.
Notifications