+ 2

Tell me what is wrong

I have tryed to figure out why I get lots of different errors on this last piece of code: nu = list(range(7)) print(nu) numbers = list(range(3, 8) print(numbers) nuum = list(range(1, 30, 4)) print(nuum)

24th Jul 2017, 8:31 PM
Sindre Havn
Sindre Havn - avatar
3 Antworten
+ 8
# It should be okay now nu = list(range(7)) print(nu) # [0, 1, 2, .., 6] numbers = list(range(3, 8)) # <-- closing bracket added print(numbers) # [3, 4, 5, 6, 7] nuum = list(range(1, 30, 4)) print(nuum) # [1, 5, 9, .., 29]
24th Jul 2017, 9:08 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
+ 5
You didn't close the bracket in the 'numbers' variable definition.
24th Jul 2017, 8:47 PM
Kuba Siekierzyński
Kuba Siekierzyński - avatar
0
Can you go a bit deeper into that explanation. perhabs show me an example using one of the codes above. Thanks!
24th Jul 2017, 9:05 PM
Sindre Havn
Sindre Havn - avatar