@@pubgmaster5827 Aise samjho step or stride (step ko hi stride bolte hain). stride = 3 yani ki har 3ri number ko print karo. I think aise sochna makes it easier and their's also nothing wrong
The third argument in the range() function specifies the number of skips the for loop has to encounter whilst its process. Like if the range(1, 10, 3) is run, the output will be all the number starting from 1, and with a skip of 3, i.e 1, 1+3, 1+3+3 etc.
11:44 Range have 3 parameters (Strat , stop , step) Step is basically an difference between the first number and last number it may be varied as per the user .
12:20 it adds 3 to in 1 to 12 range till it can be, (because the last number is 3) so first 1 then 1+ 4, 4 the 4+3, 7 the 7+3 10, and 10+3 would be 13 wich is more than 12 so It would stop there
In Python, the range() function is commonly used in for loops to generate a sequence of numbers that are then iterated over. The range() function can take up to three arguments: start, stop, and step. The step argument determines the difference between consecutive numbers in the generated sequence. # start :stop:step for i in range (5,100,5): print(i,end = " ")
Hey harry! I am truly grateful for your efforts! I will surely try to contribute to your work in someway! I regularly watch your python and javascript videos, i am being taught by you and i enjoy watching your videos. Thanks you sir!
00:00 Introduction to Loops 01:31 Loops in programming 03:07 Python has iterable objects that can be looped over using for loops 04:33 Learn to iterate through strings and lists in Python 06:07 Learn about indentation, iterating lists, and using the for loop 07:38 Print numbers between two given values using range() function 09:24 Understanding the range function in Python 10:56 Explore the third parameter of range Crafted by Merlin AI.
Iteration over range(1, 12, 3): The loop starts at k = 1, the first value in the range. The next value is calculated by adding 3, so the next k is 4. Then, 3 is added again, making the next k equal to 7. This continues until the next step would reach or exceed 12, at which point the loop stops. print(k): In each iteration, the current value of k is printed. Thanks harrry bhai.
# for loop in string name = 'Vannie' for i in name: print(i,end=' ') print("Thanks for using it ") # for loop in List List01 = ['Vannie','Princess'] for names in List01: print(names) # Range function # if you have seen Avengers Endgame You will get it for i in range(1,3001): print('Love You ',i) # Step argument in range for i in range(2,22,2): print(i)
thank you bhaiya mene aapki 129 videos wali python playlist dekhi n really usse mujhe bhut help mili n thank you for all your efforts.. thank you big bro..🙏
Day 4 of #100DaysOfCode. Today in this video 17, I learned about loops in Python, specifically for loops, which can iterate over iterable objects like strings, lists, tuples, sets, and dictionaries. I also learned about the range() function for controlling loop iteration based on a specific range of numbers, including how to define start, end, and step values. Thank You Harry Bhaiya.
In the last part of the video, amongst the three numbers, the last number got added to the first number and gave the output. The middle number represented the upper limit till which the output would be calculated. If the addition exceeds the middle number, the program terminates.
for k in range(1,30,3): print(k+2) if we are print like this so we are get esily table of three and if we can print like this for k in range(1,20,2): print(k+1) so we can print table 2
11:48 it's the step value. Used for incrementing and decrementing the values as per requirement. It can go forward as well as backward as per the step value given.
#A little example of programme for the for loop: table = int(input("Entre the table you want: ")) for i in range(10): print(table,"x",i+1,"=", table*(i+1))
1 start, 12 end, 3 step 1 1+3 = 4 4+3 = 7 7+3 = 10 or fir 3 plus hota hai to 13 ho jata hai lekin range me 11 tak hi print hoga isliye 10 tak hi aayega.
Present sir ji, Thanks for all your effort and make us learn everyday a new thing. bohot bohot dhanyawad apka. you deserve more than 100M subscriber you will reach soon sirji. best teacher we are watching.
step is used for intervals between values of sequence. eg:- for i in range(0,1001,100): print(i) output will be:- 0 100 200 300 400 500 600 700 800 900 1000 >
Range parameters are (start, Stop, Step). So, loop starts with 1 and every iterations it Stops on 3rd parameter means (1,2,3) and then again starts from 4 and stop on another 3rd parameter i.e. 7 and it will go until it reach a value less than 12. Happy Learning !!!! 😁
If you havent did C/C++ and starting with python understand it like this for i in range(0(starting i = 0), 10(ending condition if i < 10), 2(steps i+2)) i.e. for( i = 0 ; i < 12 ; i+2).First i is set to 0 then it checks if 0
Hi Harry! I follow your channel and really like your content. I wonder if you could make a separate video on Excel automation through Python. As I work in the financial industry such a course would be really helpful. Some of the organizations are still using the age-old VBA to automate excel file. However, if we start using python, it will really make our job a lot easier. Thanks in advance.
Explanation of quick quiz : The third argument in range is used for determining the difference between two consecutive numbers: like shown at 10:58 in video the program print the numbers with a difference of 2 (3-1=2) and similarly at 11:17 the program print the numbers with difference of 3 (4-1=3)
third argument in range() is a step-up value that will increase start value by given step-up value ex: for i in range (1, 10, 2): # starting from 1, ends at 10-1, and 2 is step-up_value print(i) output: 1 # start from 1 3 # now 1+2= 3 5 # 3+2 = 5 7 # 5+2 = 7 9 # 7+2 = 9 # and because now 9+2 = 11, It will stop at 9
In the range(x, y, z) expression: x: This is the start value, meaning the sequence will start from this number. If x is not provided, it defaults to 0. y: This is the stop value, and it represents the end of the sequence (but it’s exclusive), meaning the sequence will stop before reaching this number. z: This is the step value, which determines how much the numbers in the sequence will increase (or decrease) by. If omitted, the default is 1. Example: For range(1, 10, 2), the values for x, y, and z are: x = 1 (start at 1) y = 10 (stop just before 10) z = 2 (step or increment by 2)
The step in range in for loop actually let the python interpreter allow to make an increement in between the numbers on each iteration as per the given step. For example if 1 is given as a step, then the interpreter will make a gap of 1 on each number occurs on an iteration. Hope I have demonstrated clearly 11:06
Day 17 consistency ✌️ Btw : c/c++/java se Anne walo logo k liye (easy Language) thodi mushkil hai 😂 q ki hume curly braces aur parentheses aur variable type explicitly declare karne ki addat hai 😂😂
Big fan harry sir I have learnt whole basic python 12 hour video But I have not laptop May thats why I can't able to Make or use ' sample.txt file' or open sample.txt in pydroid3 Except this I have learnt all things Please make a proper video on topic " open or write any .txt without opening " On pydroid 3 Thanks a lot
Day - 17 Present Sir Python 🔥🔥 Sir please make a video on GSOC ( google summer of code , how we can participate and win the certification of GSOC and 1500$ Stipend from google , pls make a video on this from scratch , So we can participate in GSOC 2023 , Thank you so much harry bhai ❤❤
@@RudrakshGirdhar-gb9zu I don't know about It , Only Harry Bhai Can answer this , In my opinion Might be it include some DSA because it is for 100 days ....
if we are ranging something in x,y,z then, x,y are ranges from where it going to start and where it going to end and z is for stepping the range, if we are not using the stepping then the list will run as follows, i.e. (1,6) 1,2,3,4,5,........ and if we use stepping ( 1,6,2) then it will count 1 then skip 2 digits then show 4 etc. so the list is like ( 1,4.....)
Haryy bhi step is use to skip a value from given range for eg : for i in range( 1, 20 ,10) : print(i) will print : 1, 11 as output it will jupm 10 steps form the first value
I made this program using loop for 1st TIME: print("This is Number Printer!") print("Print no. from 0 to 5000") print("") a=int(input("Enter first: ")) b=int(input("Enter second: ")) if a and b > 5000: print("Numbers Can Only be from 0 to 5000") else: if b
In python range( start,stop,step) is a function : where, start states-> From where to start ;Default is 0. stop states->Where to stop;Given value step states-> The incrementation part of the output... @Bangladesh
The step function is used as increment and decrement value for the range values which is added by python before printing the next element. The first element will printed as it is which is the starting,int,float and any element.
Step is the argument in the range function in for loop which basically is a value which adds to the i variable. For example, if i=0 and step=2 then the output will be like print(i+step) which is equal to i=i+step i.e., 0+2=2
Sorry Harry Bhai, I will not be able to follow this course My 10th pre-boards have started and boards pressure 😔😔😔😞😞😞😞 But after the boards I will definitely complete this course. Love you brother You got me into coding You are the best ❤❤❤
bro I am in 10th too my prelims are gnna start from 8th jan but I have decided to give at least half an hour of my day to learn python programming like common we can dedicate at least 30 mins to programming
Dude, I'm also going to give my 12th pre-board exam next time. You won't ever learn it if you keep leaving it for later. Better give at least 20 minutes to coding. This will help you to leave the monotonous of studying
in for loop increment by default is 1. but if u want to overwrite that so you have to use step parameter for that. for k in range(1,12,3) in this example 1 is start point 12 is till u want to go and 3 is steps which is u overwrited. output: 1 4 7 10 mean with 1 now incrementing 3.
Code :- for k in range(1,12,3): print(k) Explanation :- this basically means the 1 will be printed and after that 2 numbers will be skipped(2 and 3) and then 4 will be printed , this is happening because the third parameter given in the range function is called the step parameter, if the value of the step parameter is given as 4, then 3 values will be skipped and the 4th value will be printed.
It prints the first value, and then keeps doing increments without printing any value until it reaches the nth value, where n is the step argument. For example we use 3 as 3rd argument and range 1-10, It will print 1st value which is 1 and then print every next 3rd value 1, 4(1+3), 7(4+3) , 10(7+3)
(start, stop , step) first to hmare "start" point ko print krega fir next me jo bhi value aayega use hmare "step" se devide krega agr hmara remainder 1 aayega to us value ko print krega nhi to dusre value ke liye cheak krega aur hmare "stop" point tk cheak krta jayega for n in range(1, 15, 3): print(n) Output:- 1 4 7 10 13 (1) Firstly we will print starting point = 1 then cheak condition (2) 2%3=0 remainder is 0. we will not print 2 (3) 3%3=0 remainder is 0. we will not print 3 (4) 4%3=1 remainder is 1 . we will print 4 (5) 5%3=2 remainder is 2. we will not print 5 (6) 6%3=0 remainder is 0. we will not print 6 (7) 7%3=1 remainder is 1. we will print 7 (8) 8%3=2 remainder is 2. we will not print 8 (9) 9%3=0 remainder is 0. we will not print 9 (10) 10%3=1 remainder is 1. we will print 10 (11) 11%3=2 remainder is 2. we will not print 11 (12) 12%3=0 remainder is 0. we will not print 12 (13) 13%3=1 remainder is 1. we will print 13 (14) 14%3=2 remainder is 2. we will not print 14 (15) 15%3=0 remainder is 0. we will not print 15
Basically step func. terminates or skip the no.s in between in loops. Just like in the above case where the code was: for i in range(1,12,3): print(i) The output is 1,4,7,10 . SO IT BASICALLLY SKIPS EVER TWO LETTERS IN BETWEEN THE NO.S OF IN SIMPLE WORDS IT ADDS 3
@codewithharry sir let (a, b, c) if we run this code then it's result is (a+c) but c must be less the b. And code also gives the value less then b For example range (1,5,2) After print that is 1 1+2=3 2+2=4 But not gives 4+2=6 Because 6 is greater then 5
For i in range(1, 12, 3): Print(i) Output - 1,4,7,10 In range the first argument is starting no. Of loop, second is ending of loop and third is skip or increase no. Of loop
The range function in Python comes with 3 arguments: start, stop, and step. range(start, stop, step) e.g. for i in range(1, 10, 2): print(i) Here, 1-->starting point, 10--> Stopping point 1-->step size, difference between each point. Extras: *As a default zero is the starting point if the starting point is not defined *the range function in Python not to include the stop value follows a common pattern in computer science known as half-open intervals. In a half-open interval, the starting point is inclusive, but the ending point is exclusive.
There are 3 range functions start, stop and step, general syntax of range: range( start, stop, step) step is used to increment between start and stop e.g , range in i ( 10, 1, 2) output is 1, 3, 5, 7,9 The start is 1, the stop is 10 (exclusive), and the step is 2. It generates a sequence of numbers starting from 1, incrementing by 2, and stopping before reaching 10.
00:01 Introduction to loops in Python 01:42 Understanding the basics of for loops in Python 03:16 Looping through iterable objects in Python 04:57 Using for loops to iterate through a list of strings in Python. 06:37 Explaining the usage of for loop and range function in Python 08:10 For loops in Python allow iteration between specified numbers or ranges. 09:44 Using range function in Python for loops 11:12 Understanding the functionality of commenting out and running code in Python.
00:01 Introduction to loops in Python 01:42 Understanding the basics of for loops in Python 03:16 Looping through iterable objects in Python 04:57 Using for loops to iterate through a list of strings in Python. 06:37 Explaining the usage of for loop and range function in Python 08:10 For loops in Python allow iteration between specified numbers or ranges. 09:44 Using range function in Python for loops 11:12 Understanding the functionality of commenting out and running code in Python. Crafted by Merlin AI.
it is the property of range(). In for k in range(1,12,3) print(k) 1 is the value from where loop starts, 12 is the value where loop stops, and 3 is the difference between the values.
the third parameter is increment the value of range ex of for k in range( 1,200,4) this expression is starting in 1 and ending in i-1 and increment the value of 4 per iteration
The third parameter ;step is the interval between each number in the sequence and it is the ratio by which each number is printed after an increment which is the third parameter: step
@CodeWithHarry the loop start from 1 to and 12 and the numbers are increment in each step at 3 until it reaches a value which is less than 12. the values are 1,4,7,10.
So it works like this: Start at 1, print it. Add 3, now it’s 4, print it. Add 3, now it’s 7, print it. Add 3, now it’s 10, print it. Add 3, now it’s 13. But 13 is bigger than 12, so the loop stops.
Present Sir Well well well i don't have instagram sir so i post the explanation here range(start, stop, step) iterates like for(i=start, i < stop, i += step), so it add the number in step upto stop hope this is understandable for people not knowing java or c++
range(1,100,2) here 2 is a step value now step value is basically refers as the difference value between the two values e.g 1 and 3 so basically it is a common difference for an AP created by range function.
It is stepping in( int) function Start inclusive :integer upto (exclusive):character to be skipped For example For l in Range (1, 13,1) Print(l) = 1,2,,3.......
The loop starts at 1 and increments by 3 in each iteration until it reaches a value that is less than 12. The values printed are 1, 4, 7, and 10.
3-3 ke gap me print krega values ko 1-12 Tak
This is the best explaination, I couldnt find words to express.
Thankyou
Best explanation in simple words .
thank you
Thanku bro
Step is used for increment or decrement in loops.
For ex. for k in range(1,12,3):
print(k)
It increases the value by three as 1,4,7,10
Yup, As in C/C++
Similar concept to string formatting step size argument.
Bro but 10 tk hi isme 3 add hua h esa kyu
@@pubgmaster5827 uske baad 13 print hona tha lekin 13 tak range nhi hai, isliye 10 par stop ho gya
@@pubgmaster5827 Aise samjho step or stride (step ko hi stride bolte hain). stride = 3 yani ki har 3ri number ko print karo. I think aise sochna makes it easier and their's also nothing wrong
The third argument in the range() function specifies the number of skips the for loop has to encounter whilst its process. Like if the range(1, 10, 3) is run, the output will be all the number starting from 1, and with a skip of 3, i.e 1, 1+3, 1+3+3 etc.
yes
thanks i
Thank u ❤
11:44
Range have 3 parameters
(Strat , stop , step)
Step is basically an difference between the first number and last number it may be varied as per the user .
Updation function
So basically an Arithmetic Progression with range(first term, sort of last term, common difference) ?
That its call as jump ..
@@gnomeunknown4717yesss
hey this course by harry is enough for python?
12:20 it adds 3 to in 1 to 12 range till it can be, (because the last number is 3) so first 1 then 1+ 4, 4 the 4+3, 7 the 7+3 10, and 10+3 would be 13 wich is more than 12 so It would stop there
In Python, the range() function is commonly used in for loops to generate a sequence of numbers that are then iterated over. The range() function can take up to three arguments: start, stop, and step. The step argument determines the difference between consecutive numbers in the generated sequence.
# start :stop:step
for i in range (5,100,5):
print(i,end = " ")
copied answer
What is the use of this end?
Hey harry! I am truly grateful for your efforts! I will surely try to contribute to your work in someway! I regularly watch your python and javascript videos, i am being taught by you and i enjoy watching your videos. Thanks you sir!
tablenum = int(input("which table you want?: "))
table1 = int(input("x * y = x: type your y: "))
print("
")
for table1 in range(table1 + 1):
print(f"{tablenum} * {table1} = ", table1 * tablenum)
for i in range (1,20,3) # Here 1 is starting number of for loop and 20 is last number and 3 is used for jumping/gapping number between range.
thanks bro
Output is
1
4
7
10
13
16
19
Best explanation ever in comment section
00:00 Introduction to Loops
01:31 Loops in programming
03:07 Python has iterable objects that can be looped over using for loops
04:33 Learn to iterate through strings and lists in Python
06:07 Learn about indentation, iterating lists, and using the for loop
07:38 Print numbers between two given values using range() function
09:24 Understanding the range function in Python
10:56 Explore the third parameter of range
Crafted by Merlin AI.
Bro are you completed this course how many days you have taken to complete
Iteration over range(1, 12, 3):
The loop starts at k = 1, the first value in the range.
The next value is calculated by adding 3, so the next k is 4.
Then, 3 is added again, making the next k equal to 7.
This continues until the next step would reach or exceed 12, at which point the loop stops.
print(k):
In each iteration, the current value of k is printed.
Thanks harrry bhai.
in "for K in range(1, 12, 3):
print(K)
output is = 1, 4, 7, 10
because 3 is combineing with 1 =1+3 = 4, again 4+3 = 7 and again 7+3 =10
i also used this logic.
# for loop in string
name = 'Vannie'
for i in name:
print(i,end=' ')
print("Thanks for using it ")
# for loop in List
List01 = ['Vannie','Princess']
for names in List01:
print(names)
# Range function
# if you have seen Avengers Endgame You will get it
for i in range(1,3001):
print('Love You ',i)
# Step argument in range
for i in range(2,22,2):
print(i)
who is inn 2024 ??
Me
Me
Me
Me
Bhai sare hi h
thank you bhaiya mene aapki 129 videos wali python playlist dekhi n really usse mujhe bhut help mili n thank you for all your efforts.. thank you big bro..🙏
In every video of This course has learned me at least one new thing about python !!! Thanks ❤️ Harry bhai
Day 4 of #100DaysOfCode. Today in this video 17, I learned about loops in Python, specifically for loops, which can iterate over iterable objects like strings, lists, tuples, sets, and dictionaries. I also learned about the range() function for controlling loop iteration based on a specific range of numbers, including how to define start, end, and step values.
Thank You Harry Bhaiya.
yes bro!!!
@@prabhkiratsingh4a917 bhai mai class 4 mai hu
@@Aditya-jo1of to?
@@sureshyadav9317 mai bta rha hu mai class 4 mai hu
@@Aditya-jo1of are bhai bhut seekh liya hoga per jbtk tumhari job lgegi tb tk coding will be of ai
Was confused about how to use for loop , but now got some clarity. Thanks
Not first ,but I am regular watched your video
Naam kya hai, aap ka..
I have regularly watched*
Haa ye krlo pehle
@@KoushikDas2005 i am regularly watching **
@@nawalkishor1914 that's true in present continuous
I said in present perfect
Haha :)💀
In the last part of the video, amongst the three numbers, the last number got added to the first number and gave the output. The middle number represented the upper limit till which the output would be calculated. If the addition exceeds the middle number, the program terminates.
for k in range(1,30,3):
print(k+2)
if we are print like this so we are get esily table of three
and if we can print like this
for k in range(1,20,2):
print(k+1)
so we can print table 2
11:48 it's the step value.
Used for incrementing and decrementing the values as per requirement.
It can go forward as well as backward as per the step value given.
Regular watched* , Don't Span
@@unolive8026 tu rhne de 🙏
@@KoushikDas2005 tuhhhh. Toh gaya beta
#Decrement in for loop
for l in range(20,15,-1):
print(l)
8:38 harry bhai reaction😂😂😂😂😂😂
Day 17✨
#A little example of programme for the for loop:
table = int(input("Entre the table you want: "))
for i in range(10):
print(table,"x",i+1,"=", table*(i+1))
1 start, 12 end, 3 step
1
1+3 = 4
4+3 = 7
7+3 = 10
or fir 3 plus hota hai to 13 ho jata hai lekin range me 11 tak hi print hoga isliye 10 tak hi aayega.
Present sir ji, Thanks for all your effort and make us learn everyday a new thing. bohot bohot dhanyawad apka. you deserve more than 100M subscriber you will reach soon sirji. best teacher we are watching.
A very helpful course Harry Bhai!
Can't thank you enough
Bhi Harry bhi ka 8 hr wala karlo 3 din me khatam ho jayga and fir aoo
Fir jaldi samj ayga 😍
tablenum = int(input("which table you want?: "))
table1 = int(input("x * y = x: type your y: "))
print("
")
for table1 in range(table1 + 1):
print(f"{tablenum} * {table1} = ", table1 * tablenum)
step is used for intervals between values of sequence.
eg:- for i in range(0,1001,100):
print(i)
output will be:-
0
100
200
300
400
500
600
700
800
900
1000
>
Range parameters are (start, Stop, Step). So, loop starts with 1 and every iterations it Stops on 3rd parameter means (1,2,3) and then again starts from 4 and stop on another 3rd parameter i.e. 7 and it will go until it reach a value less than 12.
Happy Learning !!!! 😁
If you havent did C/C++ and starting with python understand it like this
for i in range(0(starting i = 0), 10(ending condition if i < 10), 2(steps i+2)) i.e. for( i = 0 ; i < 12 ; i+2).First i is set to 0 then it checks if 0
Hi Harry!
I follow your channel and really like your content. I wonder if you could make a separate video on Excel automation through Python. As I work in the financial industry such a course would be really helpful. Some of the organizations are still using the age-old VBA to automate excel file. However, if we start using python, it will really make our job a lot easier. Thanks in advance.
yes..
I want this python automation with excel
For k in range( start, stop, step)
The loop starts k from "start" and increments by "step" till the time value of
k < "stop"
Explanation of quick quiz : The third argument in range is used for determining the difference between two consecutive numbers:
like shown at 10:58 in video the program print the numbers with a difference of 2 (3-1=2)
and similarly at 11:17 the program print the numbers with difference of 3 (4-1=3)
Thanks bro
third argument in range() is a step-up value that will increase start value by given step-up value
ex:
for i in range (1, 10, 2): # starting from 1, ends at 10-1, and 2 is step-up_value
print(i)
output:
1 # start from 1
3 # now 1+2= 3
5 # 3+2 = 5
7 # 5+2 = 7
9 # 7+2 = 9
# and because now 9+2 = 11, It will stop at 9
Dear Harry, why did you stop Machine Learning series. Please continue. It was very useful.
In the range(x, y, z) expression:
x: This is the start value, meaning the sequence will start from this number. If x is not provided, it defaults to 0.
y: This is the stop value, and it represents the end of the sequence (but it’s exclusive), meaning the sequence will stop before reaching this number.
z: This is the step value, which determines how much the numbers in the sequence will increase (or decrease) by. If omitted, the default is 1.
Example:
For range(1, 10, 2), the values for x, y, and z are:
x = 1 (start at 1)
y = 10 (stop just before 10)
z = 2 (step or increment by 2)
quick quiz :- third parameter is evaluated after each iteration in for loop
The way you teach is great...I always had a smile on my face..Thank you for your complete and excellent teaching.
Code Backup Repository: github.com/CodeWithHarry/100-days-of-code-youtube
Day 17
oho
The step in range in for loop actually let the python interpreter allow to make an increement in between the numbers on each iteration as per the given step. For example if 1 is given as a step, then the interpreter will make a gap of 1 on each number occurs on an iteration. Hope I have demonstrated clearly
11:06
Day 17 consistency ✌️
Btw : c/c++/java se Anne walo logo k liye (easy Language) thodi mushkil hai 😂 q ki hume curly braces aur parentheses aur variable type explicitly declare karne ki addat hai 😂😂
You are right bro 👍👍👍
Same bhai
😂
us bhai😂😂
tablenum = int(input("which table you want?: "))
table1 = int(input("x * y = x: type your y: "))
print("
")
for table1 in range(table1 + 1):
print(f"{tablenum} * {table1} = ", table1 * tablenum)
#can you for table of millions * millions
still live with harry bhai full motivated ,dedicated and program centric mind ke sath harry bhai ke sath lage hai
Big fan harry sir
I have learnt whole basic python 12 hour video
But I have not laptop
May thats why I can't able to
Make or use ' sample.txt file' or open sample.txt in pydroid3
Except this I have learnt all things
Please make a proper video on topic
" open or write any .txt without opening "
On pydroid 3
Thanks a lot
Why dont you use replit
Its available for android
@@anantkumar007 Bro it takes time to run the code as well as could not do if full screen in my device
For to use my keyboard perfectly
😏😏😏😏😏😏
As a C++ student it was little confusing. But you explained it very well. Thanks:)
Third parameter will increment the loop according to its vale(value passed in third parameter)
for i in range(1,8,2):
print(i)
Output:-
1
3
5
7
So in this range(1,8,2)
Here 1 is starting value of i so this loop will run until i
Day - 17 Present Sir Python 🔥🔥 Sir please make a video on GSOC ( google summer of code , how we can participate and win the certification of GSOC and 1500$ Stipend from google , pls make a video on this from scratch , So we can participate in GSOC 2023 , Thank you so much harry bhai ❤❤
Is this course includes DSA???
@@RudrakshGirdhar-gb9zu allready DSA playlist available in this channel you can chk
@@RudrakshGirdhar-gb9zu I don't know about It , Only Harry Bhai Can answer this , In my opinion Might be it include some DSA because it is for 100 days ....
@@suvrajitpanda3797 okay but I was asking can I rely on this for DSA?
@@RudrakshGirdhar-gb9zu u can also use C program and Java for DSA
I am present 🎁🎉
if we are ranging something in x,y,z then, x,y are ranges from where it going to start and where it going to end and z is for stepping the range, if we are not using the stepping then the list will run as follows, i.e. (1,6) 1,2,3,4,5,........ and if we use stepping ( 1,6,2) then it will count 1 then skip 2 digits then show 4 etc. so the list is like ( 1,4.....)
Bhaiya vscode ka maza replit me nhi aa rha hai
To bhai tum vs code use karlo
@@hhayanesbade ache advices dete ho hacker lagte ho 🌚
Haryy bhi step is use to skip a value from given range
for eg :
for i in range( 1, 20 ,10) :
print(i)
will print : 1, 11 as output
it will jupm 10 steps form the first value
I made this program using loop for 1st TIME:
print("This is Number Printer!")
print("Print no. from 0 to 5000")
print("")
a=int(input("Enter first: "))
b=int(input("Enter second: "))
if a and b > 5000:
print("Numbers Can Only be from 0 to 5000")
else:
if b
use elif instead of first else
In python
range( start,stop,step) is a function :
where,
start states-> From where to start ;Default is 0.
stop states->Where to stop;Given value
step states-> The incrementation part of the output...
@Bangladesh
The step function is used as increment and decrement value for the range values which is added by python before printing the next element. The first element will printed as it is which is the starting,int,float and any element.
for h in range(2,10,2):
print(h)
output:
2,4,6,8
the first number for start
and 2nd for the end
last for the incress in number after 1st to last
Day 6 of asking to make a discord server
Day 1 of telling wait for next year 😂
Step is the argument in the range function in for loop which basically is a value which adds to the i variable. For example, if i=0 and step=2 then the output will be like print(i+step) which is equal to i=i+step i.e., 0+2=2
Sorry Harry Bhai, I will not be able to follow this course
My 10th pre-boards have started and boards pressure
😔😔😔😞😞😞😞
But after the boards I will definitely complete this course.
Love you brother
You got me into coding
You are the best ❤❤❤
bro I am in 10th too my prelims are gnna start from 8th jan but I have decided to give at least half an hour of my day to learn python programming like common we can dedicate at least 30 mins to programming
bro ye sab bahana hai coding sachme sikhni hai to daily time fix krlo for bs utna time bhi doge to ho jayega samjhe
Dude, I'm also going to give my 12th pre-board exam next time. You won't ever learn it if you keep leaving it for later. Better give at least 20 minutes to coding. This will help you to leave the monotonous of studying
@@deepikaop4545 Boards jyada important hain bhai..
@@arpankarmakar16 skills > degree
Hey ="bhaiya",
#You are awesome 👍👍👍
Best explanation 👌👌
Fibonacci series can also be developed using the last example of range function with 3 parameters
"Samajh rahe ho ap? Samajh rahe ho?" was priceless lol!
love you Harry bhai! awesome course
Kon kon 2024 me dekh raha ha😂
in for loop increment by default is 1. but if u want to overwrite that so you have to use step parameter for that.
for k in range(1,12,3)
in this example 1 is start point 12 is till u want to go and 3 is steps which is u overwrited.
output:
1
4
7
10
mean with 1 now incrementing 3.
Thanks
Code :-
for k in range(1,12,3):
print(k)
Explanation :-
this basically means the 1 will be printed and after that 2 numbers will be skipped(2 and 3) and then 4 will be printed , this is happening because the third parameter given in the range function is called the step parameter, if the value of the step parameter is given as 4, then 3 values will be skipped and the 4th value will be printed.
It prints the first value, and then keeps doing increments without printing any value until it reaches the nth value, where n is the step argument.
For example we use 3 as 3rd argument and range 1-10, It will print 1st value which is 1 and then print every next 3rd value 1, 4(1+3), 7(4+3) , 10(7+3)
attendance here
Pakisanio attendance dado na edar>>???
Love you Harry Sir ;
May you live long;'
❤❤❤❤❤ from Pakistan
(start, stop , step)
first to hmare "start" point ko print krega
fir next me jo bhi value aayega use hmare "step" se devide krega
agr hmara remainder 1 aayega to us value ko print krega nhi to dusre value ke liye cheak krega
aur hmare "stop" point tk cheak krta jayega
for n in range(1, 15, 3):
print(n)
Output:-
1
4
7
10
13
(1) Firstly we will print starting point = 1
then cheak condition
(2) 2%3=0 remainder is 0. we will not print 2
(3) 3%3=0 remainder is 0. we will not print 3
(4) 4%3=1 remainder is 1 . we will print 4
(5) 5%3=2 remainder is 2. we will not print 5
(6) 6%3=0 remainder is 0. we will not print 6
(7) 7%3=1 remainder is 1. we will print 7
(8) 8%3=2 remainder is 2. we will not print 8
(9) 9%3=0 remainder is 0. we will not print 9
(10) 10%3=1 remainder is 1. we will print 10
(11) 11%3=2 remainder is 2. we will not print 11
(12) 12%3=0 remainder is 0. we will not print 12
(13) 13%3=1 remainder is 1. we will print 13
(14) 14%3=2 remainder is 2. we will not print 14
(15) 15%3=0 remainder is 0. we will not print 15
Basically step func. terminates or skip the no.s in between in loops.
Just like in the above case where the code was:
for i in range(1,12,3):
print(i)
The output is 1,4,7,10 . SO IT BASICALLLY SKIPS EVER TWO LETTERS IN BETWEEN THE NO.S OF IN SIMPLE WORDS IT ADDS 3
@codewithharry sir let (a, b, c) if we run this code then it's result is (a+c) but c must be less the b. And code also gives the value less then b
For example range (1,5,2)
After print that is
1
1+2=3
2+2=4
But not gives
4+2=6
Because 6 is greater then 5
Thanku Harry bhai for protecting our carrier in coding 😊😊
#HarryBhai
🙌 bohot achha sikhaya hai yaha tak. sab achhe se samajh aaya hai. i trust you aage bhi sab samajh ayega harry bhai 🙏
it is actually incrementing each value with 2 like for each run of for loop
Hi,
1,12 mean 1 up to 11 number Like This:
1
2
3
4
5
6
7
8
9
10
11
and the 3 mean 1 number after 3 numbers not execute!
so easy 😊😊
Thank you harry bhai for this amazing course 💜💜💜💜
For i in range(1, 12, 3):
Print(i)
Output -
1,4,7,10
In range the first argument is starting no. Of loop, second is ending of loop and third is skip or increase no. Of loop
The range function in Python comes with 3 arguments: start, stop, and step.
range(start, stop, step)
e.g.
for i in range(1, 10, 2):
print(i)
Here,
1-->starting point,
10--> Stopping point
1-->step size, difference between each point.
Extras:
*As a default zero is the starting point if the starting point is not defined
*the range function in Python not to include the stop value follows a common pattern in computer science known as half-open intervals. In a half-open interval, the starting point is inclusive, but the ending point is exclusive.
There are 3 range functions start, stop and step, general syntax of range:
range( start, stop, step)
step is used to increment between start and stop
e.g , range in i ( 10, 1, 2)
output is 1, 3, 5, 7,9
The start is 1, the stop is 10 (exclusive), and the step is 2. It generates a sequence of numbers starting from 1, incrementing by 2, and stopping before reaching 10.
00:01 Introduction to loops in Python
01:42 Understanding the basics of for loops in Python
03:16 Looping through iterable objects in Python
04:57 Using for loops to iterate through a list of strings in Python.
06:37 Explaining the usage of for loop and range function in Python
08:10 For loops in Python allow iteration between specified numbers or ranges.
09:44 Using range function in Python for loops
11:12 Understanding the functionality of commenting out and running code in Python.
for k in range(1,12,3)
here 1 is the starting value,
12 is the ending value(n-1) and
3 is step ( i.e 3 steps to increase)
1+3=4 ,4+3=7, 7+3=10.
Completed Day #17 Love From BD💙
Day-17 Complete ✅✅
00:01 Introduction to loops in Python
01:42 Understanding the basics of for loops in Python
03:16 Looping through iterable objects in Python
04:57 Using for loops to iterate through a list of strings in Python.
06:37 Explaining the usage of for loop and range function in Python
08:10 For loops in Python allow iteration between specified numbers or ranges.
09:44 Using range function in Python for loops
11:12 Understanding the functionality of commenting out and running code in Python.
Crafted by Merlin AI.
for x in range ( a, n , d )
print(x)
a = first term
n = last-1 term
d = common difference
This python course is helpful harry bhai 💫...
it is the property of range().
In for k in range(1,12,3)
print(k)
1 is the value from where loop starts,
12 is the value where loop stops,
and 3 is the difference between the values.
the third parameter is increment the value of range ex of for k in range( 1,200,4)
this expression is starting in 1 and ending in i-1 and increment the value of 4 per iteration
The third parameter ;step is the interval between each number in the sequence and it is the ratio by which each number is printed after an increment which is the third parameter: step
@CodeWithHarry
the loop start from 1 to and 12 and the numbers are increment in each step at 3 until it reaches a value which is less than 12. the values are 1,4,7,10.
So it works like this:
Start at 1, print it.
Add 3, now it’s 4, print it.
Add 3, now it’s 7, print it.
Add 3, now it’s 10, print it.
Add 3, now it’s 13. But 13 is bigger than 12, so the loop stops.
Present Sir
Well well well i don't have instagram sir so i post the explanation here
range(start, stop, step) iterates like for(i=start, i < stop, i += step), so it add the number in step upto stop
hope this is understandable for people not knowing java or c++
range(1,100,2) here 2 is a step value now step value is basically refers as the difference value between the two values e.g 1 and 3 so basically it is a common difference for an AP created by range function.
range(x,y,z)=x= start,y=limit,z=number can miss during print(z-1).
Thank you, brother. your way of teaching is amazing. very well understood now. thanks.
amazing helpful videos i have ever taken.
For i in range (start, stop, step) :
Print(i)
I. E:
>> start
Start+step
.
.
.
Start+stop-step(end print one)
for example
for i in range(1,67,2)
print(i)
1 say start ho ga or 2 ka difference ho ga 67 tk print karay ga
output(1,3,5,7,9,11....)
Thank you sir 🙏❤️
Actually if we compare this for loop with Java for loop it's basically for(i = 1; i
yes kind of but the second argument is not a condition, more like the ending point
It is stepping in( int) function
Start inclusive :integer upto (exclusive):character to be skipped
For example
For l in Range (1, 13,1)
Print(l)
= 1,2,,3.......