Python Interview Question (Part 1) || Interview Prep By Schoolabe

preview_player
Показать описание
Python Interview Question || Interview Prep By Schoolabe @codingwithRohit

Interview Prep is a series on Schoolabe which help you to crack interview question.
Рекомендации по теме
Комментарии
Автор

1
2
Crt answer
First print i value ( i value is 1 )
Then I value is 1 +=1
Answer is 2
First time I try this I'm happy.😊

santhoshsandy
Автор

While condition is always true
So the loop doesn't end

ChaithanyaMatroju
Автор

Option B : there shouldn't be space between +=

ritesh
Автор

b) error because there is space between
+=

sruchiprasad
Автор

and D --- bcz ans is actually 1 2 in this format 1
2
bcz in print(i) is not like this print(I, end=' ')

rahulsingh-rquo
Автор

option B, i % 3 does have a remainder of 0 so it will break the loop and throw a syntax error because there is a space in between += (i + = 1)

Py-Weekly
Автор

Option D - it will print I first, then only error

gokulgopan
Автор

Option B

Reason: the += is spaced in between

Besno
Автор

C)1
2
Option c is a correct answer

Aravind.
Автор

Correct ans is Option
It will print only 1 and 2 jaise hi 3 pe condition satisfy hogi then break ho jayega aur output 1 and 2 hi aayeg😅

parammahato
Автор

Option c because when we run loop that time for number 1, 2 never break loop but for three number break loop and program stop so answer is will come 12

rohya
Автор

if we remove space btw +=
then the output is 1 2

shivamkestwal