about | help | code help+videos | done | prefs |
Do exercise 6.3.3 in the book. For the algorithm which requires 12n steps you will get five numerical answers. In class we saw that the first was .00000012 and the fourth was .012. For the algorithm which requires n*n steps you should also get five answers. Make a list L of these 10 answers, in numeric form. So the list looks like L = [.00000012,-,-,.012,-,-,-,-,-,-] and you have to fill in the blanks. Copy and paste the following code and use your list L to fill in the blank: def fun633(k): L = [...] if k < 15: return list2string([k]) else: return list2string(L) def list2string(L): s = "" for val in L: s += str(val) + ' ' return s fun633(1) → '1 ' fun633(2) → '2 ' fun633(3) → '3 ' ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy