Skip to content

Instantly share code, notes, and snippets.

@Hayyhayy
Last active March 14, 2020 08:17
Show Gist options
  • Select an option

  • Save Hayyhayy/96501d582a675d2837782e8ac32220fe to your computer and use it in GitHub Desktop.

Select an option

Save Hayyhayy/96501d582a675d2837782e8ac32220fe to your computer and use it in GitHub Desktop.
While n is greater than 0, display the value of n and then reduce the value of n by 1. When you get to 0, exit the statement and display the word Blastoff!
n = 10
while True:
Print(n, end=' ')
n = n - 1
print('Done!')
n = 5
while n > 0:
print(n)
n = n - 1
print('Blastoff!')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment