NCERT Solutions Class 11 Computer Science (Python) Chapter-7 (Introduction to Python)
Class 11 Computer Science (Python)
Chapter-7 (Introduction to Python)
Questions and answers given in practice
Chapter-7 (Introduction to Python)
Question 1:
Is Python a high-level Language ?
Answer:
Yes, Python is a high-level Language.
Question 2:
Is Python interpreted ?
Answer:
Yes, Python is a interpreted language.
Question 3:
Is Python Object-Oriented Language ?
Answer:
Yes, Python is a Object-Oriented Language.
Question 4:
How many modes are available in Python ?
Answer:
interactive mode and script mode.
Question 5:
Can Python be easily integrated with C+ + ?
Answer:
Yes, Python can be easily integrated with C + +.
Question 6:
Is Python supports GUI applications?
Answer:
Yes, Python supports GUI applications.
Question 7:
Does Python support automatic garbage collection ?
Answer:
No, Python does not support automatic garbage collection.
Question 8:
Does Python support Hyper Text Markup Language?
Answer:
No, Python does not support Hyper Text Markup Language.
Question 9:
“Python is Scalable”, is this statement true?
Answer:
True.
Question 10:
Can we connect Python to database ?
Answer:
Yes, we can connect with all major commercial databases.
Short Answer type Questions [2 mark each]
Question 1:
Define Python ?
Answer:
Python is a high-level, interpreted, interactive and object oriented-scripting language.
Question 2:
Why Python is interpreted ?
Answer:
Python is interpreted because it processed at runtime by the interpreter and you do not need to compile your program before executing it. This is similar to PERL and PHP.
Question 3:
Is there a tool to help find bugs or perform static analysis ?
Answer:
Yes,
- Pychecker is a static analysis tool that finds bugs in Python source code and warns about code complexity and style.
- Pylint is another tool that checks if a module statisfies a coding standards, and also makes it possible to write plug-ins to add a custom feature.
Question 4:
Who developed Python?
Answer:
Python was developed by Guido van Rossum in the late eighties and early nineties at the National Research Institute for Mathematics and Computer Science in the Netherlands.
Question 5:
Why Python is Easy-to-learn?
Answer:
Python has relatively few keywords, simple structure, and a clearly defined syntax. This allows the student to pick up the language in a relatively short period of time.
Question 6:
Write any feature of Python library.
Answer:
Python library is very portable and cross-platform compatible on UNIX, Windows, and Macintosh.
Question 7:
Write any one similarity between Python and OOPs
Answer:
Python supports most of the OOP concepts like encapsulation, inheritance and polymorphism.
Question 8:
Is Python compiler language or interpreter language?
Answer:
It is normally interpreted by another computer program. However subsets of the language can be compiled.
Long Answer type Questions [4 mark each]
Question 1:
What is the Python programming language?
Answer:
Python is an interpreted, interactive, object- oriented programming language. It is often compared to Tel, Perl, Scheme or Java.
It is a scripting language like Php or Asp for developing applications. Python is an interpreted, object-oriented, high-level programming language with dynamic semantics. Its high-level built in data structures, combined with dynamic typing and dynamic binding, make it very attractive for Rapid Application Development, as well as for use as a scripting or glue language to connect existing components together. Python’s simple, easy to learn syntax emphasizes readability and therefore reduces the cost of program maintenance. Python supports modules and packages, which encourages program modularity and code reuse. The Python interpreter and the extensive standard library are available in source or binary form without charge for all major platforms, and can be freely distributed.
Question 2:
What is Python ? State some programming language features of Python.
Answer:
- Python is a modern powerful inter-preted language with objects, modules, threads, exceptions, and automatic memory managements.
- Python was introduced to the world in the year 1991 by Guido van Rossum
Salient features of Python are :- Simple & Easy : Python is simple language & easy to learn.
- Free/open source : Everybody can use python without purchasing license.
- High level language : When coding in Python one need not worry about low-level details.
- Portable : Python codes are Machine & platform independent.
- Extensible: Python program supports usage of C/ C + + codes.
- Embeddable Language : Python code can be embedded within C/C+ + codes & can be used a scripting language.
- Standard Library : Python standard library contains prewritten tools for programming.
- Built-in Data Structure : Contains lots of data structure like lists, numbers & dictionaries.
Question 3:
Distinguish Java with Python
Answer:
Java v/s Python :
- Python programs run slower than the Java codes, but Python saves much time and space. Python programs are 3-5 times smaller than Java programs.
- Python is a dynamic typed language. Python programmers don’t need to waste time in declaring variable types as in Java.
- Python is much more easy to learn than Java.
Question 4:
Explain the disadvantages of Python.
Answer:
Disadvantages of Python are :
- Python is not the best for memory intensive tasks.
- Python is interpreted language and is slow compared to C/C+ + or java.
- Python is not a great choice for a high graphic 3D game that takes up a lot of CPU.
- Python is evolving continuously with constant evolution there is little substantial documentation available for the language.
Question 5:
Compare C + + v/s Python.
Answer:
C+ + v/s Python
- Comparison is same as that between Java and Python except the program length in python is 5-10 times shorter than that in C + + .
- Python programmers can complete a task in 2 months that takes a year in C + +.
Question 6:
How do we make Python Scripts Executable ?
Answer:
Python scripts can be executed in two ways :
- Open the script1.Py in IDE Editor and run the script in the frontmost window of the Python IDE by hitting the run all button.
- Using command prompt by making sure PATH is appropriate directly type script name. > > > python Script1.Py
NCERT Solutions for Class 11 Computer Science (Python) PDF
Unit 1 : Computer Fundamentals
- 1. Computer overview and its Basics
- 2. Software Concepts
- 3. Data Representation
- 4. Microprocessor and Memory Concepts
Unit 2 : Programming Methodology
Unit 3 : Introduction to Python
- 8. Getting Started with Python
- 9. Operators in Python
- 10. Functions
- 11. Conditional and Looping Constructs
Unit 4 : Programming with Python