- 1

1. What will be the output? 1. >>> m = [[x, x + 1 , x + 2] for x in ran a) [[1, 2, 3], [4, 5, 6], [7, 8, 9]] b) [[0, 1, 2], [1, 2, 3], [2, 3, 4]] c) [1, 2, 3, 4, 5, 6, 7, 8, 9] d) [0, 1, 2, 1, 2, 3, 2, 3, 4]

5th Jul 2016, 6:47 AM
shekhar
shekhar - avatar
7 Respostas
+ 2
You do not need 'ran' to answer this question. It is simply option b) as that is the only that option that has all the first members of the list to be consecutive. c) and d) are obviously wrong as they are printing a single list wile option a) has all its first members to be far apart. hope this helps.
7th Jul 2016, 5:25 PM
Athreyan MKS
Athreyan MKS - avatar
0
What is the content of ran?
5th Jul 2016, 7:20 AM
Gershon Fosu
Gershon Fosu - avatar
0
m=ran?
5th Jul 2016, 10:08 AM
ainifc
0
If ran = [1,4,7], then it would be a, else if was ran = [1,2,3] it would be b. But because we don't know what ran is, we can never know.
7th Jul 2016, 5:32 PM
Gershon Fosu
Gershon Fosu - avatar
0
Почему все комментарии английские
9th Jul 2016, 4:08 PM
Minecrafter PE
Minecrafter PE - avatar
0
Дурдом
9th Jul 2016, 4:10 PM
Minecrafter PE
Minecrafter PE - avatar
- 1
What is the variable ran. You never included it.
5th Jul 2016, 11:48 AM
Gershon Fosu
Gershon Fosu - avatar