Python Range() function in hindi

Python Range Function In Hindi – Range function with Examples in hindi

Python

Python Range Function In Hindi :Python 3 – Range function & step argument ko ham isliye istemal karte hai taki hame ek sath hi range ke sath number print kra sake. isse ham example sath samanjh te hai.

Python Range Function In Hindi

Contents

Syntax :

range (start, stop[, step])

Aap upper diye gye syntax ko dekh sakte hai.

Python Range() function  in hindi
Python Range() function

Start Argument :- Start Argument matlab jaha se hame number start karna hai.

Stop Argument :- Stop Argument Matlab jaha hame number ko stop karna hai.

Step Argument :- Step Argument matlab Start argument Or Stop argument number ke bich Me kitna distance dena hai.

Python Range() function with example in hindi

Example :-

# use range function () with start,stop,step argument

for i in range(1,11,1):
     print(i)

Aap dekh sakte hai hamne 3rd argument yani step argument me 1 number pass kiya hai.

Output :-

1
2
3
4
5
6
7
8
9
10

Aap upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Example 2 :-

# use range function () with start,stop,step argument

for i in range(1,11,2):
     print(i)

Aap dekh sakte hai hamne 3rd argument yani step argument me 2 number pass kiya hai. yani start or stop argument ke bich me 2 number ka distance hoga.

Output :-

1
3
5
7
9

Aap Upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Example 3:-

# use range function () with start,stop,step argument

for i in range(1,11,3):
     print(i)

Aap dekh sakte hai hamne 3rd argument yani step argument me 3 number pass kiya hai. yani start or stop argument ke bich me 3 number ka distance hoga.

Output :

1
4
7
10

Aap Upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Example 4:-

# use range function () with start,stop,step argument

for i in range(10,0,-1):
     print(i)

Aap dekh sakte hai hamne 3rd argument yani step argument me -1 number pass kiya hai. yani start or stop argument ke bich me -1 number ka distance hoga.

Output :-

10
9
8
7
6
5
4
3
2
1

Aap Upper Diye gye output ko dekh kar program ko samanjh sakte hai.

Step Argument

Python Range Function In Hindi

Also Read This Post :

Dosto mujhe ummed hai ki aap Range() function explained with Examples in hindi ko acchi tarah se samanj gye honge agar aap ko ye post acchi lage to mere is website ko jarur follow kre or ha agar aap video bhi dekhna chahte hai to aap mere channel ko bhi subscribe kar sakte hai. channel ka link aapko home page par mil jayega |

Leave a Reply

Your email address will not be published. Required fields are marked *