CJCoding With Joseph
15free / daySign inCreate account
← Back to Question List
Python Code Walkthrough #1

Running Total Inside The Loop

easyLoops

📄 Code

Read carefully — what does this print?
1total: int = 0
2for value in [4, 7, 1]:
3 total = total + value
4 print(total)
5print('done')

🎯 Your Answer

Next →