Using loop logic in a python code snippet, create a loop that counts down from 15 to 5 by 3's printing the count as it is processing.
example output:
Counter Example
count = 15
count = 10
count = 5
Python code:
#initializing count as 15
count=15
#looping till count is less than 5
while(count>=5):
#printing the value of count
print("count =",count)
#decrementing count by 5
count-=5
Screenshot:
Output:
Get Answers For Free
Most questions answered within 1 hours.