Professional Documents
Culture Documents
Chapter 6 Getting Started With Python
Chapter 6 Getting Started With Python
Question 1
1. High level ✓
2. Object oriented ✓
3. procedural
4. difficult
Question 2
1. Interpreter ✓
2. Compiler
3. Combination of Interpreter and compiler
4. Special virtual engine
Question 3
Python code can run on a variety of platforms, it means Python is a .......... language.
1. Graphical
2. Cross-platform ✓
3. independent
4. all of these
Question 4
1. Interactive mode
2. Script mode ✓
3. A combination of interactive and script modes
4. All of these
Question 5
1. Interactive mode ✓
2. Script mode
3. Combination of interactive and script modes
4. All of these
Question 6
Question 7
1. Print statement
2. Print( ) function
3. print statement
4. print( ) function ✓
Question 8
You don't have to pay for Python and you can view its source code too. It means Python is ..........
Question 1
Python's two working modes are : interactive mode and script mode.
Question 3
The shortcut key to run a Python program from script mode is F5.
Question 4
Question 5
True/False Questions
Question 1
Question 2
Question 3
You can create programs in Python's interactive mode.
False
Question 4
Question 5
Question 1
Answer
Question 2
Who was Python's developer and which two languages contributed to Python as a programming language?
Answer
Guido Van Rossum is the developer of Python. ABC language and Modula-3 contributed to Python as a programming language.
Question 3
Answer
A cross-platform software is a software that can run well on a variety of platforms like Windows, Linux/Unix, Macintosh, etc.
Question 4
Answer
1. Easy to Use — Python is compact, programmer-friendly and very easy to use object oriented language with very simple syntax rules.
2. Expressive Language — Python is an expressive language, it takes fewer lines of codes to represent the same syntax.
3. Interpreted Language — Python is an interpreted language, not a compiled language. It makes Python an easy-to-debug language and
thus suitable for beginners to advanced users.
4. Completeness — Python has a rich standard library that provides modules for most types of required functionality like emails, web-
pages, databases, GUI development, network connections, etc.
5. Cross-platform Language — Python can run equally well on variety of platforms — Windows, Linux/UNIX, Macintosh,
supercomputers, smart phones, etc.
6. Free and Open Source — Python language is freely available along with its source-code.
7. Variety of Usage/Applications — Python has evolved into a powerful, complete and useful language over these years. These days
Python is being used in many diverse fields/applications, some of which are Scripting, Web Applications, Game development, Database
Applications, System Administrations, Rapid Prototyping, GUI Programs.
Question 5
What are some limitations of Python programming language?
Answer
1. Not the Fastest Language — As Python is an interpreted language so its execution-times are not that fast compared to some compiled
languages.
2. Lesser Libraries than C, Java, Perl — Library collection of C, Java, Perl is better than Python.
3. Not strong on Type-Binding — Python interpreter is not very strong on catching 'Type-Mismatch' issues.
4. Not easily convertible — Translating Python programs to other languages is difficult due to its lack of syntax.
Question 6
Answer
Question 7
Answer
Interactive mode is useful for testing code. We can type the commands one by one and get the result of error immediately for each command.
Disadvantages of Interactive mode are that it does not save commands in form of a program and also output is sandwiched between commands.
Question 8
Answer
Script mode is useful for creating programs and then run the programs later and get the complete output. It is not suitable for testing code.
Question 1
Answer
Interactive Mode
Script Mode
Solution
Output