Skip to content

Instantly share code, notes, and snippets.

@kipkitur
Created July 16, 2020 02:43
Show Gist options
  • Save kipkitur/d734dc222f27933b4d93d3215b26088d to your computer and use it in GitHub Desktop.
Save kipkitur/d734dc222f27933b4d93d3215b26088d to your computer and use it in GitHub Desktop.
#while loop runs every time the condition is true
temp = 37
while temp>=32:
print("The water is {} degrees".format(temp))
#use decrement operator to stop loop when the temp is less than 32
temp -= 1
# break ends the loop and goes to the next statement
if temp==32:
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment