Page 337 - Artificial Intellegence_v2.0_Class_9
P. 337
• 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.
12 What is the use of the + operator with lists?
Ans. The + operator is used to concatenate the list with another list.
13. What do you mean by traversing a list?
Ans. Traversing a list means to visit each element and process it as required by a program.
14. What is the use of the pop( ) function?
Ans. The pop( ) function removes an element from the list based on the index number specified in the function and returns
the deleted value.
B. Long answer type questions:
1. What is sequential flow? Explain with an example.
Ans. In sequential flow, the statements are placed one after the other and the flow of execution occurs starting from
line1, line2 and so on with a top to down approach. It is the default type followed in any programming language. For
example, Steps for calculating percentage of any student
Input marks of English, Hindi and Math
Total the marks
Introduction to Python 335

