Page 26 - Informatics_Practices_Fliipbook_Class12
P. 26

>>> print(sections)
              A    40
              B    50
              C    50
              D    50
              E    40
              F    60
              G    50
              dtype: int64
         >>> #Reducing the sanctioned strength of sections by 5
         >>> reducedStrength = sections - 5
         >>> print(reducedSections)
              A    35
              B    45
              C    40
              D    45
              E    40
              F    35
              G    45
              dtype: int64
         >>> #Doubling the sanctioned strength of sections
         >>> doubledStrength = sections * 2
         >>> print(doubledStrength)
              A     80
              B    100
              C    100
              D    100
              E     80
              F    120
              G    100
              dtype: int64
         >>> #Reducing the sactioned strength of sections by half
         >>> halfStrength = sections / 2
         >>> print(halfStrength)
              A    20.0
              B    25.0
              C    25.0
              D    25.0
              E    20.0
              F    30.0
              G    25.0
              dtype: float64


          C T  06     1.  Write Python statements to find sum total of all salaries given to employees by the company.
                      2.  Write Python statement to determine minimum salary offered to employees.
                      3.  Write Python statement to determine maximum salary offered to employees.
                      4.  Write Python statement to determine average salary offered to employees.
                      5.  Write Python statement to increment salary offered to all employees by 500.




               min(): Returns minimum value in the series
               idxmin(): Returns index of minimum value in the series
               max(): Returns maximum value in the series
               idxmax(): Returns index of maximum value in the series
               sum(): Returns sum of all the values in the series


          12   Touchpad Informatics Practices-XII
   21   22   23   24   25   26   27   28   29   30   31