Page 15 - ipp11
P. 15

Program 16: Write a program in Python to find and display the sum of all the values which are ending with 3
                 from a list.
                      Code:










                  Output:











                 Program 17: Write a program to shift the positive numbers to the left and the negative numbers to the
                 right so that the resultant list will look like—
                 Original list: [-12, 11, -13, -5, 6, -7, 5, -3, -6]
                 Output should be: [11, 6, 5, -6, -3, -7, -5, -13, -12]
                   Code:










                  Output:












                                                              11
   10   11   12   13   14   15   16   17   18   19   20