Geek4Tutorial.com
A tutorial blog for Python, HTML and AS400/ IBM iSeries - Geek4Tutorial
Pages
Home
Python
HTML
Python Books
Quiz
AS400 / IBM iSeries
Contact Us
While loop - Python program
Find first n numbers divisible by 5 using while loop
Code Snippet:
#first n numbers divisible by 5 n=int(input("Enter n:")) while(n>0): if n%5 == 0: print(n, end=',') n-=1
Copy
First n number divisible by 5 using while loop
Output:
Output - first n number divisible by 5
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)

## No comments:

## Post a Comment