I Haz Codes

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Menu
Getting some zzzzz

Enter the code below. The best way to fall asleep is to count backwards from 100 to 1. The program below has not been completed.

Sample display would be –

100
99
98
.. etc

Change the following –

  • Change the start to be “100” instead of 0.
  • Change the end condition, “x < 100” to be x is greater than or equal to 0.
  • Change “x = x + 1” so that it subtracts one each time.
 
x = 0
while x <= 100:
    print (x)
    x = x + 1

Leave a Reply

Your email address will not be published. Required fields are marked *

Information