- 1
n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0:
Python quiz. How do I skip the even numbers and print old numbers
2 odpowiedzi
+ 7
Augustine Ansah Owusu
Kindly remove those unwanted links!
+ 5
You can use "for x in range(1,n,2)" instead of "for x in range(1,n)" . Then loop will iterate only for 1,3,5,..etc. odd numbers :-)