Page 106 - Computer - 8
P. 106

Lab Activity 1                                                                         Experiential Learning
           To create a user-defined function without any arguments or return value and call it.
           1. Type the code as shown in the image in the Python Editor.


















           2. Press the F5 key to execute the code. Sample output of the program is given below.


















             Lab Activity 2
                                                                                                   Experiential Learning
           To create a user-defined function that takes arguments but does not return any value and call it.
           1. Type the code as shown in the image in the Python Editor.
















           2. Press the F5 key to execute the code. Sample output of the program is given below.

















              104
   101   102   103   104   105   106   107   108   109   110   111