0% found this document useful (0 votes)
2 views5 pages

Computer Programming Range

The range() function generates a sequence of numbers starting from 0 by default, with a user-defined step and stopping before a specified number. It consists of three parameters: start, stop, and step, where start is the initial integer, stop is the limit (exclusive), and step is the increment. An example demonstrates printing numbers from 0 to 9 with a step of 2 using the range function.

Uploaded by

jasonmarvin0101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views5 pages

Computer Programming Range

The range() function generates a sequence of numbers starting from 0 by default, with a user-defined step and stopping before a specified number. It consists of three parameters: start, stop, and step, where start is the initial integer, stop is the limit (exclusive), and step is the increment. An example demonstrates printing numbers from 0 to 9 with a step of 2 using the range function.

Uploaded by

jasonmarvin0101
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Range

(start,stop,step)
Definition
The range() function returns a
sequence of numbers, starting from
0 by default, and increments by a
user-defined value and stops before
a specified number.
3’S of Range
Start, Stop, Step
start: integer starting from which the
user has defined.

stop integer before which the sequence


of integers is to be returned.
The range of integers ends at stop — 1.

step: integer value which determines the


increment between each integer in the
sequence.
Example
Range
Function In this example, we are printing the
number from 0 to 9 with the jump
of 2. We are using the range
function in which we are passing
Output
the starting and stopping points
with the jump of the iterator.
“Its harder to read code
than to write it”
- Joel Spolsky
(Software engineer and writer) Dave Harvey Villanueva
Kurl Ivan Patayan
Regil Kent Gopez
Shander Clutario

You might also like