Page 163 - Touchpad_Plus_V3.2_Class 8
P. 163

Python
                                                                                                21 st   #Creativity
                                                                                              Century   #Technology Literacy
                 Project 1                                                                     Skills

                      Write a Python program to calculate the sum of all numbers from 1 to N, where N is a user
                    input.

                     Write a Python program to calculate the factorial of a number using a loop.
                     Write a Python program to display the Fibonacci sequence up to N terms.
                 Project 2


                      Write a Python program to print all even numbers from 1 to N, where N is provided by the
                    user.
                     Write a Python program to count how many digits are in a given number.
                 Project 3


                      Write a Python program that presents the user with a menu of operations and repeatedly
                    asked for input until the user decides to exit. The menu should contain the following options:
                    •  Addition of two numbers
                    •  Subtraction of two numbers

                    •  Multiplication of two numbers
                    •  Division of two numbers

                    •  Comparison to check which number is greater
                    •  Display the multiplication table of a given number

                    •  Exit the program






































                                                                                                  Project Work       161
   158   159   160   161   162   163   164   165   166   167   168