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")
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
Related questions
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution!
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 3 images
Recommended textbooks for you
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr