Python Libraries

This is in continuation of Learn Python with Jupyter Notebook .

I discussed about data structure techniques Dictionary and Set. Understanding the difference between all data structure techniques. I also discussed about different installation options and overview of Python world.

Key Takeaway

Today I will further compare Python control and loop commands with C. I will discuss working of Jupyter notebook and  will provide brief introduction  of Python core libraries using the same.

Control Statements

if condition

if (testExpression1)

{ // statement(s) }

else if(testExpression2)

{ // statement(s) }

else if (testExpression 3)

{ // statement(s) }

………………………

else

{ // statement(s) }

conditional operators are ==,  !=,  >=,   <=

if testExpression1 :

// statement(s)

elif testExpression2:

// statement(s)

elif testExpression3:

// statement(s) 

……………………..

else :

// statement(s)

for loop

In C, the general format is

for (initialize; check_Condition; Modify)

{ // statement }

In Python, the general format is

for val in sequence:

//statements

Ex: for x in range (1,5) :

y – x*2

While

In C, the general format is

while(condition) {

//statement(s);

}

In Python, the general format is

while testExpression1 :

// statement(s)

Use of break and continue is same as in C

Python Core Libraries :

SciPy  is  a Python based open-source software  ecosystem for mathematics, science, and engineering. It has following core packages :

Anaconda Navigator here.

JupyterLab is an interactive development environment for working with notebooks, code and data. However Jupyter notebook is recommended for beginners.

conda install -c anaconda anaconda-navigator

I take  Jupyter notebook analogy  as the modern ADVANCED Software  Scientific Calculator.  Lets  check this in notebook itself.

This image has an empty alt attribute; its file name is calculator.png

This article is discussed in  detail at  Python with Jupyter Notebook Part 2 video.

Please subscribe to YouTube channel Embedkari  for additional embedded related stuff.

 

Exit mobile version