Skip to content

Instantly share code, notes, and snippets.

@JayeshTiwari03
Created February 22, 2018 19:31
Show Gist options
  • Save JayeshTiwari03/ef7b25c92ebdbeed81b8037c182005bb to your computer and use it in GitHub Desktop.
Save JayeshTiwari03/ef7b25c92ebdbeed81b8037c182005bb to your computer and use it in GitHub Desktop.
Python Exercise on http://www.practicepython.org
num = int(input("Please choose a number to divide: "))
listRange = list(range(1,num+1))
divisorList = []
for number in listRange:
if num % number == 0:
divisorList.append(number)
print(divisorList)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment