on-internet
← Community

no matter what i tried it only counts one room instead of however many are set (PYTHON)

Stack Overflow ·

it wont work with me and im trying to figure it out, help asap please, i cant really describe the root cause of the issue as im still new to coding totalCost = 0.00 rooms=int(input('How many rooms are there? ')) smallCost = 299.99 largeCost = 499.99 loop = 0 while loop < rooms: smallWindows=int(input('How many small windows are there in this room? ')) largeWindows=int(input('How many large windows are there in this room? ')) loop=(loop + 1) totalCost=(largeWindows * largeCost) + (smallWindows * smallCost) print('Your total is £',totalCost,'! ')

Comments

Sign in or sign up to comment and upvote.

No comments yet.