Rohan Verma

Learning Machine Learning and other programming stuff

View on GitHub

A Python Q&A Session

Why do people use python?

  1. Software quality
  2. Developer Productivity
  3. Program Portability
  4. Support Library
  5. Component Integration
  6. Enjoyment

Python

Python is a general-purpose programming language that is often applied in scripting roles. It is commonly defined as an object-oriented scripting language—a definition that blends support for OOP with an overall orientation toward scripting roles.

Downside of Python

Its execution speed may not always be as fast as that of fully compiled and lower-level languages such as C and C++

What can we do in Python

  1. Systems Programming
  2. GUIs
  3. Internet scripting
  4. Component Integration
  5. Database Programming
  6. Rapid Prototyping
  7. Numeric and scientific Programming
  8. Games, Images, Data mining etc.

Python’s Technical Strength

  1. Its Object Oriented and Functional
  2. It’s free
  3. It’s Portable
  4. It’s Powerful
  5. It’s Mixable
  6. It’s Relatively easy to use
  7. It’s Relatively easy to learn

Test Your Knowledge

Q1. What are the six main reasons that people choose to use Python?

Software quality, developer productivity, program portability, support libraries, component integration, 
and simple enjoyment. Of these, the quality and productivity themes seem to be the main reasons that 
people choose to use Python.

Q2. Name four notable companies or organizations using Python today.

Google, Industrial Light & Magic, CCP Games, Jet Propulsion Labs and Maya

Q3. Why might you not want to use Python in an application?

Python’s main downside is performance: it won’t run as quickly as fully compiled languages like C and C++. 
On the other hand, it’s quick enough for most applications, and typical Python code runs at close to C speed 
anyhow because it invokes linked-in C code in the interpreter. If speed is critical, compiled extensions 
are available for number-crunching parts of an application.

Q4. What can you do with Python?

You can use Python for nearly anything you can do with a computer, from website development and gaming to 
robotics and spacecraft control.

Q5. What’s the significance of the Python ‘import this’ statement?

This was mentioned in a footnote: import this triggers an Easter egg inside Python that displays some of the 
design philosophies underlying the language. You’ll learn how to run this statement in the next chapter.

Q6. Why does “spam” show up in so many Python examples in books and on the Web?

“Spam” is a reference from a famous Monty Python skit in which people trying to order food in a cafeteria 
are drowned out by a chorus of Vikings singing about spam. Oh, and it’s also a common variable name in 
Python scripts...

Q7. What is your favorite color?

Blue. No, yellow! (See the prior answer.)