You are on page 1of 10

Python Markdowns

Lets see Various Python markdowns

1. # (single # key) - is used for main headings


2. ##, ###, #### (2 - 4 # keys) - are used for subheading
3. ** ------ ** - for bold letters we will make use of 2 stars in starting and last (similarly we can also use __
gddgfsf __ )
4. * ------ * - Are used for bold and itallic
5. --- - for itallic letters we use of 1 star in starting & last (similarly single underscore either side of letters)

6. for website in link in a word - [name of the link](link of the webiste)


7. for inserting picture in jupyter notebook - ![name of the image](link of the image)
8. for backquotes - We use > symbol
9. for email and url - we use < at starting and > at ending. ex: < www.google.co.in (http://www.google.co.in)
>

1. Headings

You can add headings by starting a line with one (or multiple) # followed by a space, as in the following
example:

# Heading 1

# Heading 2

## Heading 2.1

## Heading 2.2

### Heading 2.2.1

#### Heading 2.2.1.1

##### Italic and bold heading

MCE
# Heading level 1

## Heading level 2

### Heading level 3

#### Heading level 4


##### Heading level 5

###### Heading level 6

Example

MCE
Mechanical

IP

Auto

EC

MCE

Alernate for Heading level 1 and Heading Level 2

using = (equal sign) for Heading level 1 and - symbol for Heading Level 2

Heading Level 1
=============

Heading Level 1
------------

2. Bold and Italic

content - for bold we will make use of 2 stars in before & after the text (similarly we can also use __ gddgfsf __
)

content - Are used for itallic (single star or single Underscore - before and after the text)

content - Are used for bold and itallic (3 star or 3 Underscore at before and after the text)

**NOTE:** In HTML, we use below sentence for bold and Italic

for **Bold** - <strong>content or word</strong>


for **Itallic** - <em>content or word</em>
for **bold & Itallic** - <strong><em>content or word</em></strong>
this is **chethan**. studied in *NIIT* in ***DATA SCIENCE*** and i am from __Bengalore__
. intrested in learning *R/python Tutorial* and i look _forward_ to hear from ___you
guys___

this is __chethan__. studied in [mce](http://www.mcehassan.ac.in) in ___DATA SCIENCE___


and i am from __Bengalore__ . intrested in learning *R Tutorial* and i look forward to
hear from ___you guys___

3. Syntax for links


IMarkdown supports 2 style for creating links:

1. Inline
2. Refrence

NIIT (https://www.niituniversity.in/)

**Inline Style syntax is;**

1. [Example link](http://example.com). and

optionally we include title attribute in link by;

2. [Example link](http://example.com/ "With a Title").

checkout basic markdown syntax in markdown (https://www.markdownguide.org/basic-syntax/).

Reference Style

I get more traffic from [Google][1] than from [Yahoo][2] or [MSN][3].

[1]: http://google.co.in/       "Google"


[2]: http://search.yahoo.com/   "Yahoo Search"
[3]: http://search.msn.com/     "MSN Search"

I learn data science through [Towards data science][Data Science].

[data science]: https://towardsdatascience.com/

4. Paragraph

4.1 Paragraph
Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to predict
new output values.
Python OS module provides the facility to establish the interaction between the user and
the operating system. It offers many useful OS functions that are used to perform OS-
based tasks and get related information about operating system.
The OS comes under Python's standard utility modules. This module offers a portable way
of using operating system dependent functionality

Note above pragraph is jumbled, bcz we didnt mention one line space after each paragrah

Correct Format

Machine learning (ML) is a type of artificial intelligence (AI) that allows software
applications to become more accurate at predicting outcomes without being explicitly
programmed to do so. Machine learning algorithms use historical data as input to predict
new output values.

Python OS module provides the facility to establish the interaction between the user and
the operating system. It offers many useful OS functions that are used to perform OS-
based tasks and get related information about operating system.

The OS comes under Python's standard utility modules.

**NOTE:** For html syntax:

<p> ------content------- </p>

4.2 Line Break

To implement line break in our sentence we use Double Space

Python OS module provides the facility to establish the interaction between the user and
the operating system.
It offers many useful OS functions that are used to perform OS-based tasks and get
related information about operating system. The OS comes under Python's standard utility
modules.

Note above line break is jumbled, bcz we didnt mention Double Space after sentence

Python OS module provides the facility to establish the interaction between the user and
the operating system.  
It offers many useful OS functions that are used to perform OS-based tasks and get
related information about os.    

The OS comes under Python's standard utility modules.

**NOTE:** To implement line break in HTML we use

**The Syntax:** <p>----------<br> and in next line at end <p>


5. Lists

5.1 BUllentiening the paragraph (or) Listing

1. India
2. Karnataka
3. Hassan

1. This is chethan
2. I am from chitradurga
3. Looking forward to teach python markdown

5.2 Nested ordered List

1. this is chethan
2. i am from chitradurga
   1. Hiriyur
   2. TB Circle
   3. 577599
3. looking forward to teach python markdown

5.3 Bullentien using symbols / Unordered List

- this is chethan
- i am from chitradurg
- looking forward to teach python markdown

5.4 Nested unordered list using symbols / Unordered List

- this is chethan
- i am from chitradurg
   - Hiriyur
   - TB Circle
   - 577599
3. looking forward to teach python markdown

Note: lists in HTML

**for Ordered List:** we use <ol> <li>list elements</li> </ol>

- use <ol> at starting and ending with </ol>


- use <li> at starting and ending of each list elements with </li>

**for unordered List** we use <ul> <li>list elements</li> </ul>

- use <ul> at starting and ending with </ul>


- use <li> at starting and ending of each list elements with </li>
06. Image

In Markdown, syntax of images is equivalent to the syntax of link

![markdown image](https://www.atriainnovation.com/wp-content/uploads/2021/02/portada.jpg)

Getting a image from Local Folder - 2 ways:

1. Inline
2. Refrence

Note that: ipynb and image file should be their in same folder

**Business Analytics** ![image](data.jpg)

Note: If we want to call our image through the working directory, then our ipynb file and image location
should ne in same floder.

07. Blockquotes

Blockquotes with multiple paragraph- add > symbol between the paragraph

Nested Blockquotes- add double >> symbol infront of the paragraph, if i wanted to nest it

> This is chethan, I am from chitradurga and Looking forward to teach python markdown

Blockquotes with multiple paragraph

> This is chethan,


> i am from chitradurga
> Looking forward to teach python markdown

Note above blockquote is jumbled, bcz we didnt meantion one line space and blockquote after each
paragrah

Correct Format:

> This is chethan,


>
> I am from chitradurga and
>
>Looking forward to teach python markdown

Nested Blockquotes

> This is chethan,


>
> I am from chitradurga
>> Looking forward to teach python markdown

Blockquotes with other Elements

> This is chethan,


>
> - I am from chitradurga and
> - Working for CoForge

> *Looking forward* to teach ***python markdown***

> This is chethan,


>
> - I am from chitradurga and
> - Working for CoForge
>
> *Looking forward* to teach ***python markdown***

08. links and mails

< www.google.co.in (http://www.google.co.in) >

< chetankumar.bk@coforge.com (mailto:chetankumar.bk@coforge.com) >

09. Creating tables and Alignment

Inserting a table in markdown, we use vertical pipe ( | ) to separate the columns

To create the header use |---| for each column


|Name | Branch | Gender|
| --- || --- || --- |
| Amrutha || Mech || Female|
| Amulya || Mech || Female|
| Chetan || Data Science || male|
| Dhanya || Mech || Female|
| Megha || Mech || Female|

While i am performing above code in markdown, We were getting an error. that is not working properly, bcz
of improper vertical pipe

So actual syntax for table in Markdown as below;

| First Header || Second Header |


| ------------- || ------------- |
| Content Cell || Content Cell |
| Content Cell || Content Cell |

|Name | Branch | Gender|


| --- | --- | --- |
| Amrutha | Mech | Female|
| Amulya | Mech | Female|
| Chetan | Data | male|
| Dhanya | Mech | Female|
| Megha | Mech | Female|

Changig the Alignment of table

| :-: | Centrally aligned

| -: | Right aligned

| :- | left aligned

|Name | Branch | Gender|


| :- | :-: | -: |
| Amrutha | Mech | Female|
| Amulya | Mech | Female|
| Chetan | IDS | male|
| Dhanya | Mech | Female|
| Megha | Mech | Female|

10. Equations in Markdown

Used to display the mathematical equation in line.

Here we are inserting equation using single dollar ($) in both starting and ending of the equation

Equation is $ f(x) = y^2 $

$ (a + b)^2 = a^2 + b^2 + 2*a*b $


$ (a + b) 2 a 2 + b 2 + 2 a b $

Aligning equation in center

Similarly if we need the equation in center, then we use $$ double dollar in either side of the equation

Foolwing euation is $$ (a + b)^2 = a^2 + b^2 + 2ab $$

similarly we can use it by latex syntax:

\begin{equation}

(a + b)^2 = a^2 + b^2 + 2ab

\end{equation}

\begin{equation}
(a + b)^2 = a^2 + b^2 + 2ab
\end{equation}

11. Embed Code or Code Block Inside Markdown Cell

Assigning values into the the variables in python `a=5, b=10`

python code inside the markdown cell for addition as follows;

```python
a = 5
b = 10
c = a+b
print(c)
```

12. Horizontal Rules

To add a line we use ***, ---, ___ (either 3 star/3 minus/ 3 underscore)

***
---
___

---
***
___

___
---
***

Working Directory

In [9]:

pwd()

Out[9]:

'C:\\Users\\chetankumarbk\\Desktop\\Chethan - Data Science\\Python'

In [10]:

import os
os.chdir("C:/Users/chetankumarbk/Desktop/Chethan - Data Science/")

In [12]:

pwd()

Out[12]:

'C:\\Users\\chetankumarbk\\Desktop\\Chethan - Data Science'

HEading
Follow the instruction
1. This is chethan
2. I am from chitradurg
A. Hiriyur
B. TB Circle
C. 577599
3. Looking forward to teach python markdown

This is chethan.
I am from chitradurg.
Looking forward to teach python markdown

You might also like