The range of a function is domain beginning with x to and end point y.
e.g: P(x,y)
As the term "range" can have different meanings, it is considered a good practice to define it the first time it is used in a textbook or article. Older books, when they use the word "range", tend to use it to mean what is now called the codomain.
Create a sequence of numbers from 2 to 2, but increment by 3 instead of 1:
for n in range(2, 12, 3):
print(n)
The formula is
for variable in range(start, end, increment) you should
print(variable)
Top comments (0)