Question: Read the instructions carefully and follow them exactly : - The only collections you can use are strings, tuples, and lists. You may not use

Read the instructions carefully and follow them exactly:

- The only collections you can use are strings, tuples, and lists. You may not use any other collection (such as a set or dictionary) in this assignment. Using any of these in a solution to a question constitutes changing that question. Consequently, that question will not be graded.

- If you get help from the Internet or from another person, you must cite the section of code you borrowed and the source. Failure to do so will result in a grade of 0 for the whole assignment. You may only borrow no more than 15% of your code.

- Global variables are not allowed.

Read the instructions carefully and follow them exactly: - The only collections

Problem Three Write the function findlowestPrice that receives the 'prices' 2D list as a parameter and finds the lowest gasoline price and displays the countries with the lowest gasoline price among all the countries given in the 2D below: prices =[ ['Libya', 0.03, 'Africa'], ['Turkey', 1.64, 'Asia'], ['Qatar', 0.58, 'Asia'], ['Angola', 0.37, 'Africa'], ['Nigeria', 0.42, 'Africa'], ['Finland', 2.66, 'Europe'], ['Venezuela', 0.02, 'South America'], ['Algeria', 0.02, 'Africa'], ['UK', 2.33, 'Europe']] In the main program, define your 2D list and make sure that you pass the correct parameter(s) to your function findlowestPriced and capture any returned values appropriately if any. Sample run: 2 countries have the cheapest price, just $0.02 per liter - Algeria - Venezuela Problem Four Now modify the code of the previous problem so the findLowestPrice receives the 'prices' 1D list instead of a 2D list as a parameter. The rest should be the same. The modified data structure: prices=[ 'Libya', 0.03, 'Africa', 'Turkey', 1.64, 'Asia', 'Qatar', 0.58, 'Asia'], 'Angola', 0.37, 'Africa', 'Nigeria', 0.42, 'Africa', 'Finland', 2.66, 'Europe', 'Venezuela', 0.02, 'South America', 'Algeria', 0.02, 'Africa', 'UK', 2.33, 'Europe'] The sample run should be the same

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!