Quantcast

A community for students. Sign up today!

Here's the question you clicked on:

55 members online
  • 0 replying
  • 0 viewing

camelialawson

  • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 3

    5 times i think =\

  2. S
    • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    It make sense but you are not sure?

  4. S
    • 2 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
    • 2 years ago
    Best Response
    You've already chosen the best response.
    Medals 0

    five for sure.

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

    Thanks =D

  7. Chlorophyll
    • 2 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

Ask a Question
Find more explanations on OpenStudy

Your question is ready. Sign up for free to start getting answers.

spraguer (Moderator)
5 → View Detailed Profile

is replying to Can someone tell me what button the professor is hitting...

23

  • Teamwork 19 Teammate
  • Problem Solving 19 Hero
  • You have blocked this person.
  • ✔ You're a fan Checking fan status...

Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.

This is the testimonial you wrote.
You haven't written a testimonial for Owlfred.