0
For loop
1,2,3,1,4,5,6,2,7,8,9,3.......N Print out this series using loop ?
3 Answers
+ 1
Try it this solution:
n = int(input())
save = 1
for k in range(1, n + 1):
count = 0
for t in range(save, 3*n + 1):
if count == 3:
save = t
break
print(t)
count += 1
print(k)
This code print the following result:
123145627893...
It depends of n input value
+ 1
should N be the first occurence of it or the count/index of the term (Nth... in wich case should start at zero or at one)?
I guess that's the former (more challenging), but it's quite unclear ^^
0
DURGESH RAWAT
Where is your attempts?
Be like this person "Bill"
https://www.sololearn.com/post/1115272/?ref=app