Page 55 - Code & Click - 7
P. 55

E.  Write the output of the following expressions or code segment in Python:
                1.  print(“This is a funny statement”, “Ha!” * 4)

                2.  print((True and False) or (True and not(False)))
                3.  print((5 ** 3) – (50 * 2) + 40 % 8))
                4.  X = 30
                     if X > 20:
                          print(“You have a large number”)
                     else:

                          print(“You have a small number”)

            F.  Give the answer for each of the following in one word.
                1.  Function in Python that converts a string value into its integer form.             __________
                2.  Feature in Excel that lets you apply formatting to cells as per a specified
                    condition.                                                                         __________

                3.  Chart in Excel used to show the relationships among numeric values in several data
                    series, in the form of XY coordinates.                                             __________

            G.  Identify and underline the errors in the code given below. Also, write the correct code.
                # Program to accept two numbers and display the smaller number

                Num1 = input(Enter first number : )
                Num2 = print(“Enter second number : ”)
                If Num1 > num2

                 print(“Second number is smaller”)
                or:
                 print(“First number is smaller”).

            H.  Answer the following questions in brief.

                1.  Explain the working of the if … else statement in Python with an example.
                2.  What is the difference between the face value and place value of a digit in a number?
                3.  Differentiate between the division operator and modulus remainder in Python.

                4.  Name any five types of charts available in Excel 2016.

            I.  Answer the following questions.
                1.  What are Conditional statements? Write the syntax of any two Conditional statements in
                    Python.

                2.  What is a data type? Explain the common data types available in Python with an example of
                    each.
                3.  Write a short note on the binary number system.
                4.  What do you mean by sorting data? Write the steps to sort data on multiple columns in a
                    worksheet.



                                                                                                                 53
   50   51   52   53   54   55   56   57   58   59   60