Geek4Tutorial.com
A tutorial blog for Python, HTML and AS400/ IBM iSeries - Geek4Tutorial
Pages
Home
Python
AS400 / IBM iSeries
Python Books
Contact Us
Python program to Create a list of the first 15 even numbers that are not divisible by 6
Code:😃
ans =[]*15
for i in range (2,100,2):
if i%6 != 0 and len(ans) < 15:
ans.append(i)
print("List of first 15 even numbers that are not divisble by 6:\n",ans)
Python
Output:🙌🙌
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)