Page 81 - Digicode_AI_class_8
P. 81

C.  Create a program to print reverse of an integer number
















              You can view the code of the above program in ‘Python’ by selecting ‘Python’ as an Editor.

              D.   Create  a program which assigns total marks of a student to variable, and displays grade by using
                 the logic given below:
                     Total marks > 70, then display grade A

                    Total marks >49 and Total marks <=70, then display grade B
                    Total marks <=49, then display grade C

              E.  Write a program to determine if an entered number is a fraction or a whole number.
              F.   Define  a function to calculate the simple interest. The function should take the amount, the rate
                 of interest, and the time duration as arguments. The function should return the calculated simple
                 interest.
              G.   Make an array of animals (5 animals in the array) and use for loop which runs as many times as the
                 length of the array to drop horses from the sky.





                                                                       Leadership & Responsibility
                       TECH VALUE                                      Initiative


                       Never  use  and  take  credit  for  someone  else's  work,  even  when  it  has  not  been
                       protected by copyright law, patent, etc. Always recognize and give credit to other
                       people's works.






                                                                           Advanced MakeCode Arcade       79
   76   77   78   79   80   81   82   83   84   85   86