Page 325 - AI Ver 1.0 Class 9
P. 325

SECTION B (Subjective Type Questions)

            A.  Short answer type questions:

               1.  What is a Program?
              Ans.  The  step-by-step  instruction  written  in  any  programming  language  to  do  a  specific  task  is  known  as  a  Program.
                  A program is written in any programming language which the computer can understand and execute.
               2.  What is CodeCombat?
              Ans.  CodeCombat is a free coding educational game that teaches you to learn JavaScript or Python coding in a fun way. It
                  is available for all age groups to suit the needs of all levels of coding and computer science learners.

               3.  What is the use of an arrow in flowchart?
              Ans.  It controls the direction of flow of instructions in a flowchart.

               4.  Name the steps involved in Computer Problem solving.
              Ans.  •  Understanding the problem.
                  •  Analysing the problem.
                  •  Developing the solution.

                  •  Coding and implementation.
               5.  How did Python get its name?

              Ans.  Guido van Rossum designed Python and released in 1991. He wanted to give a unique name to it. So, he named it after
                  the famous BBC comedy TV show "Monty Python's Flying Circus".
               6.  Why is Python considered as a high-level language?

              Ans.  Python simplifies the process of developing a program. The code is more close to human language and away from
                  machine language.
               7.  Name different modes of working in Python.

              Ans.  The two different modes of working in Python are:
                  •  Interactive Mode
                  •  Script Mode
               8.  What are tokens in Python? Name a few of them.

              Ans.  Tokens are the smallest meaningful unit of a program. Tokens supported by Python are Keywords, Identifiers, Literals,
                  Operators and Punctuators.
               9.  What is the use of if statement in Python?

              Ans.  It executes the set of statements based on a condition.
               10.  How is a block of statements identified in Selection or Iteration?

              Ans.  A block is identified by using an indentation (minimum 1 space). Ensure that all statements in one block are indented
                  at the same level.
               11.  What is iteration?

              Ans.  Sometimes we have a situation where we need to repeat a set of instructions a number of times then we put it in a loop
                  which repeats automatically. This is called Iteration.





                                                                                Introduction to Python  323
   320   321   322   323   324   325   326   327   328   329   330