Lecture 1 Intro
Lecture 1 Intro
Lecture 1 Intro
3. It was mainly developed for emphasis on code readability & economy i.e.
its syntax allows programmers to express concepts in fewer lines of code.
10. The two of the most used versions are Python 2.x & 3.x.
12. Python has been an inspiration for many other coding languages
such as Ruby, Cobra, Boo, CoffeeScript ECMAScript, Groovy, Swift Go,
OCaml, Julia, etc.
Key Features of Python :
a. Simple Syntax
2. Interpreted Language
b. IDLE executes and displays the output of one line of Python code at a time.
c. Displays errors while running lines of Python code and displays the entire
stack trace for the error.
b. Python interpreter determines the data types of the variables at runtime based
on the types of the parts of the expression. (It makes coding easier for
programmers but may lead to runtime errors).
a. The standard library of Python is large and saving developers both time and
effort.
6. High-Level Language
With one of the biggest communities on StackOverflow and Meetup, Python has
gained popularity over the years. If we need any kind of help related to Python,
the huge community is always there to answer our queries. A lot of questions
about Python have already been answered on these sites and Python users can
reference them as per requirement.
9. Platform Independent
Yet another interesting feature of Python is the fact that we can use it to create
GUI (Graphical User Interfaces). We can use free Libraries like Tkinter, PyQt,
wxPython, or Pyside for doing the same. Python also features a large number of
GUI frameworks available for it and various other cross-platform solutions.
Python binds to platform-specific technologies.
Identifiers :
Though these are hard rules for writing identifiers, also there are some
naming conventions which are not mandatory but rather good
practices to follow.
1. Class names start with an uppercase letter. All other identifiers start
with a lowercase letter.
2. Starting an identifier with a single leading underscore indicates the
identifier is private.
3. If the identifier starts and ends with two underscores, than means the
identifier is language-defined special name.
4. While c = 10 is valid, writing count = 10 would make more sense and it
would be easier to figure out what it does even when you look at your
code after a long time.
5. Multiple words can be separated using an underscore, for
example this_is_a_variable.