Electron microscopy
 
Python Introduction and Application Examples
- Python Automation and Machine Learning for ICs -
- An Online Book -
Python Automation and Machine Learning for ICs                                          http://www.globalsino.com/ICs/        


Table of Contents/Index 
Chapter/Index: Introduction | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z | Appendix
=================================================================================

 

Python was created by Guido van Rossum. He began working on the language in the late 1980s, and the first official release, Python 0.9.0, was released in February 1991. Guido van Rossum was working at the Centrum Wiskunde & Informatica (CWI) in the Netherlands when he started developing Python. 

Python is an interpreted language, so that one need not to compile every piece of code. The programmer can just write the command and then see the output at the command prompt. To be able to write a program in Python, the programmer can use Anaconda. Note that for the beginners, IDLE and Anaconda are enough for routine programming. On the other hand, Thonny is Python IDE for beginners. The basic steps of the installation of Python and its additions are described at Python Appendix.

Note that Python is a case-sensitive language because it distinguishes between identifiers like Variable and variable. In simple words, we can say it cares about uppercase and lowercase.

Table 945a. Programming languages.

Programming language Designed by Appeared Extension
C++ Bjarne Stroustrup 1983 .cpp
Java James Gosling 1995 .java
Python Guido van Rossum 1991 .py

Table 945a. Basic terminology.

Terminology
Explanation
Python
Impact of Python
Algorithm
A step-by step problem-solving procedure. It breaks a bigger problem into smaller problems.
Program
A sequence of instructions and computations. It is based on algorithms.
For instance, a program use algorithm to address problems:
        i) Tell the computer what to do.
        ii) Tell the computer how to do it.
        iii) Make the computer work efficiently and reliably.
Programming
The act of writing a program
Programming languages
E.g. C, C#, C++, Java, Java Script, Python, etc.
print()
Can be used outside of functions; can have as many print statements in a function; code in function continues to execute after a print; value associated with print is output to the screen, then destroyed. Parentheses, parameter or argument, quotes, string literal. Hello world!.
function
Parentheses indicate that xxx is a function. Hello world!.
Control flow
The order in which statements are executed/evaluated. The control flow can be changed by a condition or statement.
Dictionaries
It is convenient to store collection of data with lists and search for a specific element through a list. Declaration: d = dict(); d = {}; d = {'key1': 'value1', 'key2': 'value2', 'key3': 'value3'}
String literal
Anything in quotes. Hello world!.
Closure
Is a function where every free variable, everything except parameters, used in that function is bound to a specific value defined in the enclosing scope of that function. Introduction.
Decorators
 
Store results
Store results as variables or directly print them: code.
Blank/empty lines/rows/nothing
Introduction. blank in csv files, empty in a list.
Array
Introduction
NgSpice/PySpice
For electrical circuit analysis. Introduction and details.
CSV in Python
Introduction

Functions are the units which perform a particular task, take some input, and which may give some output. A function can have any number of arguments. A function may or may not return a value. The parameters are basically the input to a function. Attributes of user-defined functions. An attribute is a characteristic of an object that contains information about the object, and is also called a property of the object. An attribute name is preceded by dot, as in member.username which may contain the username for one site member.

Table 945o. Special suggestions for Python applications.

Suggestions
If the images cannot be shown (e.g. cannot be shown through Anaconda), then it should be saved on drive with save functions. code

Table 4853c. Best practices in Python programming.

Best practice Examples
Reasons of applications with Python Introduction
"Bridges" in Python coding Introduction
Put most code into a function or class code
Use __name__ to control execution of the code code
Create a function called main() to contain the code you want to run code
Call other functions from main() code
Troubleshooting and problem solving in Python programming page4806