Saturday, January 7, 2017

Blog 38

What does this program print?

list =[1,2,3,1,2,1,2]
number_of_ones= list.count(1)
print number_of_ones
print list


13 comments:

  1. 3
    [1, 2, 3, 1, 2, 1, 2]

    jonathan

    ReplyDelete
  2. 3
    [1,2,3,1,2,1,2]

    -Katelyn

    ReplyDelete
  3. 3
    [1,2,3,1,2,1,2]
    _Ben

    ReplyDelete
  4. 3
    1,2,3,1,2,1,2
    -Sean

    ReplyDelete
  5. 3
    1,2,3,1,2,1,2
    Alex Haston

    ReplyDelete
  6. Prints the number of 1's in the function after counting them, then prints the function.

    Josh Lee

    ReplyDelete
  7. It prints 3
    And it prints [1,2,3,1,2,1,2]

    - Abby Peterson

    ReplyDelete
  8. 1[1,2,3,1,2,1,2]
    Lux lei

    ReplyDelete
  9. Chris VanYe
    I forgot the list the first time
    [1,2,3,1,2,1,2]

    ReplyDelete
  10. 3
    [1,2,3,1,2,1,2]
    -Joe Haj

    ReplyDelete
  11. 3
    [1, 2, 3, 1, 2, 1, 2]

    - Owen Luther

    ReplyDelete