+ 1

How to remove multiples of 2 following code

n = int(input()) for x in range(1, n): if x % 3 == 0 and x % 5 == 0: print("SoloLearn") elif x % 3 == 0: print("Solo") elif x % 5 == 0: print("Learn") else: print(x)

23rd Feb 2022, 10:43 AM
Singabenkosi Nxumalo
Singabenkosi Nxumalo - avatar
2 Respostas
+ 6
Singabenkosi Nxumalo Please review the 3rd section of Python core 28.1, which will explain the answer given to you by NEZ
23rd Feb 2022, 11:19 AM
Rik Wittkopp
Rik Wittkopp - avatar
+ 1
... for i in range(1,n,2) ...
23rd Feb 2022, 10:54 AM
NEZ
NEZ - avatar