Saturday, November 5, 2016

Blog 22

What does this program do?
How many times does the loop go through?
Write all the output lines. (what it prints)

x=10
while x >0:
   print x
   x = x - 3

15 comments:

  1. Prints x while x is greater then 0, so x will equal -2 by the time it's done.
    x = 7
    x = 4
    x = 1
    x = -2
    ~Travis Vonheeder

    ReplyDelete
  2. This program subtracts 3 from 10 until the number is 0 or less and prints the numbers more than 0
    The loop goes through three times

    ReplyDelete
  3. It prints x then subtracts 3 from the initial value of x and saves that number as the new value of x.

    5 times

    10
    7
    4
    1
    -2

    -Katelyn

    ReplyDelete
  4. the program defines the variable x
    the loop goes through 2 times
    output lines:
    10
    10=10-3

    jonathan sandstede

    ReplyDelete
  5. Chris VanYe
    1. prints numbers and subtracts three each time
    2. 4
    3. 10, 7, 4, 1

    ReplyDelete
  6. Josh Lee
    1. Prints numbers starting with 10 and subtracting by 3 as long as the number is greater than 0.
    2. 4
    3. 10, 7, 4, 1

    ReplyDelete
  7. find out the value of x
    9
    10
    Charlie Lin

    ReplyDelete
  8. This program will minus 3 from ten until it is no longer greater than 0, it will go through the loop 4 times
    10
    7
    4
    1
    -Sean

    ReplyDelete
  9. That program write x
    The loop will go through 10 times
    -Gary

    ReplyDelete
  10. prints 10 and then sub. 3 and prints that #

    it will do this 3 times

    10
    7
    4
    1

    - Owen Luther

    ReplyDelete
  11. find the x value
    2 times
    10,7
    -Lux lei

    ReplyDelete
  12. It subtracts 3 from 10 until the product gets to 0. It goes through the loop 4 times.
    Line 1 :10
    Line 2 :7
    Line 3 :4
    Line 4 :1
    Alex Haston

    ReplyDelete
  13. 1. Starting from 10, this program decrements by 3 until it's less than 0
    2. It goes through 4 times.
    3. 10
    7
    4
    1

    - Abby Peterson

    ReplyDelete
  14. It prints the x value while it is greater than 0. It goes through 4 times.
    10
    7
    4
    1
    Joe Haj

    ReplyDelete
  15. prints numbers starting at ten going down by threes
    10
    7
    4
    1
    -Ben

    ReplyDelete