Saturday 3 August 2019

CBSE Class 11 - Informatics Practices - Chapter Python Basics (Q and A) (#eduvictors)(#cbsenotes)

Python Basics 

(Q and A)
CBSE Class 11 - Informatics Practices - Chapter Python Basics (Q and A) (#eduvictors)(#cbsenotes)

CBSE Class 11 - Informatics Practices

Q1: Who developed Python languages? Name the languages Python is based on.

Answer: Python programming language was developed by Guido Van Rossum in February 1991 python is based on or influenced with two programming language

- Abc language, a teaching language created as a replacement of BASIC, and

- Modula-3

Q2: Is Python a high level language or not?

Answer: Yes, is a very high level programming language like C or Pascal.

Q3: Does python support object oriented programming like Java or C++.

Answer: Yes, Python supports object oriented programming. 

Q4: What are the important features of Python as programming language?

1. Easy to learn and use
2. Multi-purpose
3. Platform Independent
4. Vast library support
5. Customizable Development
6. Easy to ready and understand
7. Free and Open source
CBSE Class 11 - Informatics Practices - Chapter Python Basics (Q and A) (#eduvictors)(#cbsenotes)

1. Easy to learn and use
Python is compact and is very easy to use object oriented language with very simple syntax rules. It is a very high level language and programmer friendly.

2. Multi-purpose
It is a general purpose programming language which can be used for both scientific and non scientific programming. 

3. Platform Independent
It is a platform independent programming language supports multiple operating systems Windows, Linux, Mac etc.

4. Vast library support
It is a very simple high level language with vast library of add-on modules.   

5. Customizable Development
It is suitable as an extension language for customizable applications.  

6. Easy to ready and understand
It is excellent for beginners as the language is interpreted, hence gives immediate results. The programs written in Python are easily readable and understandable. 

7. Free and Open Source
Python language is freely available, without any cost (website: It is open-source also. You can modify, improve or extend an open-source software.

Q5: List practical applications that use python.

Answer: Python is used by many companies in real revenue generating products, such as:  

✳ In operations of Google search engine, youtube, etc. 

✳ Intel, Cisco, HP, IBM, etc use Python for hardware testing.  

✳ Maya (graphics and animation) provides a Python scripting API 

✳ i–Robot uses Python to develop commercial Robot.  

✳ NASA and others use Python for their scientific programming task  

✳ Automation, Artificial Intelligence, Data Mining, Machine Learning are the latest trends where python is extensively used.

✳ Used in Web development (e.g. Django and Flask are python based web frameworks).

Q6: What are the type of errors occur while writing and running python programs?

Answer: Programs often do not work as expected. Python scripts may have the following types of errors:

1. Syntax errors: These are the most common errors, usually occur when Python parser fails to understand the script statements. It can be typos, indentation errors, python-grammatical errors or incorrect arguments.

2. Logical errors: Python scripts are grammatically or syntactically correct but has incorrect logic. e.g. a program expects addition of two numbers but the programmer by mistake did subtraction. 

3. Runtime errors: Errors shown by Python when the scripts are run. It could be fatal error due to which program terminates or could be non-fatal. For example division by zero.

#divide by zero error
a = 10
b = 0

CBSE Class 11 - Informatics Practices - Chapter Python Basics (Q and A) (#eduvictors)(#cbsenotes)

Q7: (Fun Fact) How can I read the poem 'The Zen of Python' by Tim Peters?

Answer: Type python in command shell. Python shell will open. Then type 'import this' (without quotes) and press enter key. You can read the poem.

No comments:

Post a Comment

We love to hear your thoughts about this post!

Note: only a member of this blog may post a comment.