The code below is expected to count to 60 and then say time's up, why will it not perform as expected? counter = 1 limit = 60 while counter < limit:      print(counter)      counter = counter + 1 print ("Time's up")

C++ for Engineers and Scientists
4th Edition
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Bronson, Gary J.
Chapter4: Selection Structures
Section: Chapter Questions
Problem 14PP
Question
100%

The code below is expected to count to 60 and then say time's up,
why will it not perform as expected?

counter = 1
limit = 60

while counter < limit:
     print(counter)
     counter = counter + 1

print ("Time's up")

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 3 images

Blurred answer
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr