Python Program To Show Range Basics
Python Program To Show Range Basics
Output :
When user call range() with one argument, user will get a series of numbers that starts
at 0 and includes every whole number up to, but not including, the number that user
have provided as the stop. For Example –
Output:
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Output:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 5 6 7 8 9 10 11 12 13 14 15 16 17 18
19
4. When user call range() with three arguments, user can choose not only where
the series of numbers will start and stop but also how big the difference will be
between one number and the next. If user don’t provide a step, then range() will
automatically behave as if the step is 1.
brightness_4
Output :
0 3 6 9 12 15 18 21 24 27 0 5 10 15 20 25 30 35 40 45