#NEWLINE# def test_pa2( self ) : #NEWLINE# #INDENT# expected = 'recommendations for user 0:\n  0: 9.0000\n  1: 8.0000\n  2: 7.0000\n  3: 6.0000\n  4: 5.0000\n  5: 4.0000\n  6: 3.0000\n  7: 2.0000\n  8: 1.0000\n  9: 0.0000\nrecommendations for user 50:\n  0: 9.0000\n  1: 8.0000\n  2: 7.0000\n  3: 6.0000\n  4: 5.0000\n  5: 4.0000\n  6: 3.0000\n  7: 2.0000\n  8: 1.0000\n  9: 0.0000\nrecommendations for user 99:\n  0: 9.0000\n  1: 8.0000\n  2: 7.0000\n  3: 6.0000\n  4: 5.0000\n  5: 4.0000\n  6: 3.0000\n  7: 2.0000\n  8: 1.0000\n  9: 0.0000' #NEWLINE# recs = ( [ zip ( range ( 10 ) , range ( 10 ) [ : : ( - 1 ) ] ) ] * 3 ) #NEWLINE# idxs = [ 0 , 50 , 99 ] #NEWLINE# self . assertTrue ( ( coursera_pa2_printer ( idxs , recs ) == expected ) )