Soru
What will the following code output? for i in range(5): if i=3 break print(i) 0123 012 Error 01234
Çözüm
4.5129 Voting
Ferhat
Elit · 8 yıl öğretmeniUzman doğrulaması
Cevap
The code will output "1", "2", and "3". The loop will iterate from 0 to 4, and when i equals 3, the if statement will execute the break command, which will exit the loop. Therefore, only the numbers 1, 2, and 3 will be printed.
Derecelendirmek için tıklayın: