0

What am I doing wrong on 33.2

n = int(input()) nums = list(range(5,n,5)) for x in nums: print(x) Whats the problem with this code

26th Jul 2022, 3:17 AM
kyeshawn newby
kyeshawn newby - avatar
6 Réponses
+ 4
kyeshawn newby I saw this question recently regarding a challenge. If n = 15, then the challenge expects 5, 10, 15 as output, each on a separate line. But your range will stop at 14 because it does not include the last number. So you will need range(5,n+1,5)
26th Jul 2022, 9:19 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 4
kyeshawn newby , can you please post a link to your latest try?
27th Jul 2022, 10:43 AM
Lothar
Lothar - avatar
+ 3
Mustafa A , the indentation is correct, although the recommended size of indentation is 4 spaces.
26th Jul 2022, 10:37 AM
Lothar
Lothar - avatar
+ 1
Probably the indentation of print(x). You should share the actual code.
26th Jul 2022, 7:25 AM
Mustafa A
Mustafa A - avatar
+ 1
n = int(input()) for x in (range(5,n+1,5)): print (x) The n+1 worked
27th Jul 2022, 11:54 AM
kyeshawn newby
kyeshawn newby - avatar
0
Yea its challenge 33.2 the input idk whats wrong
26th Jul 2022, 11:17 AM
kyeshawn newby
kyeshawn newby - avatar