0
range(0,100,5) How many argument in the function?
I need answer, please anybody can help.
5 ответов
+ 6
===========
| |
==== ====
| |
| |
|____|
| |
| |
| |
|==========|
| |
| |
| |
|========\
| \
| /
|======== /
| \
| \
| \
|==========
|
|
|==========
|
|
|==========
|==========
|
|
|==========
|
|
|==========
+ 4
Number of arguments for range can be:
range(50) => values from 0 up to 50 - 1:
0,1,2,3...
range(10, 50) => values from 10 up to 50 - 1:
10,11,12,..
range(10, 50, 2) => values from 10 up to 50 - 1 but only every second number:
10,12,14,...
+ 2
Tnx, Elders.
+ 1
Hi!
1st argument : start number
2nd argument : end number
3rd argument : step
If your step is 1, you can write :
range(2, 5) #all numbers between 2 and 5
If your start index is 0 and your step is 1, you can write :
range(10) #all number between 0 and 10