Navbar menu
(Move to ...)
Home
Python
HTML
JavaScript
Quiz
AS400 / IBM iSeries
Contact Us
▼
Python program to read a list of integers and print only the multiples of 8
Read a list of integers and print only the multiples of 8
Code Snippet:
list_of_integers=[1,2,5,8,10,16,32,36,40,54,72,75,80] #Logic to read a list of integers and print only the multiples of 8. print("Multiples of 8 are:") for i in list_of_integers: if (i % 8) == 0: print(i, end=',')
Copy
Multiples of 8
Output:
Output - Multiples of 8
No comments:
Post a Comment
‹
›
Home
View web version
No comments:
Post a Comment