0

Range numbers as a list.

The test question for range is incorrectly answered Nums=list(range(5)) Print(nums[4]) This is index item 4 Of 0 1 2 3 4 Result is 3 Program says 4 is the correct value Fail

26th Sep 2018, 7:12 PM
Chas
1 Respuesta
+ 7
index [item start from 0] nums[0] = 0 nums [1] = 1 nums [2]= 2 nums [3] = 3 nums[4] = 4 .
26th Sep 2018, 7:22 PM
Izaak GOLDSTEIN
Izaak GOLDSTEIN - avatar