Skip to content

Instantly share code, notes, and snippets.

@TooDumbForAName
Last active July 7, 2019 23:31
Show Gist options
  • Save TooDumbForAName/f795c0dd26755e8387db173f92f69919 to your computer and use it in GitHub Desktop.
Save TooDumbForAName/f795c0dd26755e8387db173f92f69919 to your computer and use it in GitHub Desktop.
Increment Integer Evenly 'N' Times Starting At Zero
#!/usr/bin/env python
import sys
N = int(input("Enter an integer: "))
if N == 0:
sys.exit()
if N < 0:
print("Number must be positive!")
sys.exit()
eveninteger = 0
loop = 0
while loop < N:
print(eveninteger)
eveninteger = eveninteger + 2
loop = loop + 1
sys.exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment