- 5

How many arguments are in this function call? range(0, 100, 5)

How many arguments are in this function call? range(0, 100, 5)

24th Jul 2019, 8:07 AM
DreamSTAR
13 Antworten
+ 3
The second parameter is the upper limit (in this case = 100), but 100 is not included. so if you run this code: for i in range(0,10): print(i, end=', ') # output is: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, So if the upper limit has to be included you have to say: for i in range(0,10 + 1): print(i, end=', ') # output is: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
24th Jul 2019, 9:38 AM
Lothar
Lothar - avatar
+ 3
3
24th Jul 2019, 11:59 AM
Sonic
Sonic - avatar
+ 1
ISN'T THE ARGUMENT'S ARE 0(START), 100(STOP) & 5(STEP) ? BECAUSE THE PROGRAM WILL RUN LIKE 0, 5, 10, 15, 20 TILL 95 . ANYONE, LET ME KNOW I AM WRONG OR RIGHT PLEASE .
21st Jan 2021, 9:22 PM
zeitu 🇵🇸
zeitu 🇵🇸 - avatar
+ 1
its 3 as they are asking for arguments but the list of numbers
5th Jun 2021, 8:03 PM
Jagadeesh Kumar
Jagadeesh Kumar - avatar
0
There are 3 arguments in your call to range, 0, 100 and 5. So the function goes from 0 to 100 (not included) with a step size of 5. So the series you will get is 0,5,10,15 and so on till 95. Edit: Apologies for the incorrect information earlier.
24th Jul 2019, 11:26 AM
Solo Wanderer 4315
Solo Wanderer 4315 - avatar
0
How many arguments are in this function call? range(0, 100, 5
19th Jan 2021, 7:18 PM
ramzan ebneali
ramzan ebneali - avatar
- 1
There are total of 3 arguments.
12th Jul 2020, 5:10 AM
Harsh Singh
Harsh Singh - avatar
- 1
there are 3
21st Dec 2020, 4:32 PM
Tika Azizah
Tika Azizah - avatar
- 1
3
26th Apr 2021, 12:33 PM
Moses Richard Aban DIING
Moses Richard Aban DIING - avatar
- 1
3
12th May 2021, 6:11 AM
Sangeetha Geetha
Sangeetha Geetha - avatar
- 1
3
29th Aug 2021, 5:27 AM
Karthick Nadaraj L U
- 3
There are total of 3 arguments.
24th May 2021, 10:29 AM
Hayder Jawad Al-ATBEE
Hayder Jawad Al-ATBEE - avatar
- 13
How many arguments are in this function call? range(0, 100, 5)
24th Jul 2019, 8:07 AM
DreamSTAR