This preview shows page 1. Sign up to view the full content.
Unformatted text preview: tuples, where each tuple is composed of a string value and a float value. The function
will return a NEW list that is sorted by the 2nd value of the tuple, the numerical one. The sorting
direction should be from the lowest to the largest. sort should be stable (if values are equal, use original
We’ve learned in class “bubble sort”, use this algorithm to sort the list. you cannot use any given
function by python (as sort()) or any different algorithm.
Complete: b b l _ o t 2 d v l e t p e l s )
Write your code in the appropriate place in the ex4.py Bingo! Bingo is an important activity.
To enjoy the rest of your life, one should choose the best retirement house he can afford. In the next
assignment you’ll search for the most expensive retirement house, such that you won’t finish your
savings. In this assignment you must use binary search.
Implement choosing_retirement_home, a function with 3 arguments: an initial amount on your
account, s v n s a list of annual growth perc...
View Full Document
This document was uploaded on 03/20/2014 for the course CMSC 67101 at Hebrew University of Jerusalem.
- Spring '14