Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

camelialawson

  • 4 years ago

How many times does the computer print the string "Good bye"? i = 2 while (i < 7) { print ("Good bye") i = i + 1}

  • This Question is Closed
  1. S
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    5 times i think =\

  2. S
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    It starts of with a 2.. 2<7.. then it goes into i = i+1 and becomes a 3 which is also less then 7.. then 4, 5, and 6 that are also less then 7, and i guess it stops when i reaches 7 cause its not less then 7.. So in conclusion we used 2, 3, 4, 5, 6 - 5 numbers in total.. so it prints 5 times.. i guess O_o

  3. camelialawson
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    It make sense but you are not sure?

  4. S
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    I'm 90% sure.. cause that looks like something i did in matlab.. but that was a while ago.. so i don't want to guarantee anything you know )

  5. jesssica
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    five for sure.

  6. S
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    Thanks =D

  7. Chlorophyll
    • 4 years ago
    Best Response
    You've already chosen the best response.
    Medals 1

    of course, 5 times!

  8. Not the answer you are looking for?
    Search for more explanations.

    • Attachments:

Ask your own question

Sign Up
Find more explanations on OpenStudy
Privacy Policy