Page 139 - TP_Pluse_V2.2_Class_7
P. 139

4.  Short answer type questions.
                    a.  What is decision-making statement?
                         ______________________________________________________________________________

                    b.  Write the syntax for the if…elif…else statement.
                         ______________________________________________________________________________

                    c.  Write the syntax of the if statement.
                         ______________________________________________________________________________


                 5.  Long answer type questions.
                    a.  Explain the concept of if…else statement.
                         ______________________________________________________________________________
                         ______________________________________________________________________________
                    b.   What do you understand by the Nested if statements.
                         ______________________________________________________________________________
                         ______________________________________________________________________________


                 6.  Competency-based/Application-based questions.
                    a.   Seema is the owner of a gym. She wants a Python program that calculates the fee on the basis
                       of the age of the member. Help her by writing the required code. Use the following criteria:
                         Under 18: 500 per month

                         Above 18 or equal: 700 per month
                    b.   Maria needs to categorise students into different grade levels based on their ages
                       (e.g., elementary  school,  middle  school,  high  school).  What  type  of statement
                       should she use to check the age range and assign the appropriate grade level?



                                                                                      teCh Zone


                     Let's soLve                                                                21 st
                                                                                              Century   #Critical Thinking
                     What will be the output of the following programs?                        Skills

                     1. a = int ( input ( "Enter a First Number: " ) )
                       b = int ( input ( "Enter a Second Number: " ) )
                       if a > b :
                           print ( "First number is greater than second number " )
                       else :
                           print ( "Second number is greater than first number " )
                     2. num = 3.4

                       if num > 0:
                           print("Positive number")
                       elif num == 0:
                           print("Zero")
                       else:
                           print("Negative number")


                                                                                    Conditional Statements in Python  137
   134   135   136   137   138   139   140   141   142   143   144