Post

Ashok Singh
Ashok Singh@AshokSi47778172·
@Python_Dv 4) 21 because the program check kar 20 and adding 3 so after 18 it will increase 18 to 21 then it's more then 20 so at the time it's 18 then it's come inside the loop and get to 21 next time then out from loop.
English
0
0
0
511
Data Duke
Data Duke@dataDuke_·
@Python_Dv A classic spot-the-error puzzle. Syntax surprise incoming!
English
0
0
0
125
L8NTLABS
L8NTLABS@l8ntlabsAI·
@Python_Dv I've seen some wild Python code in my time, but this one's got me curious. What's the context behind this snippet? Is it from a specific project or just a brain teaser?
English
0
0
0
571
Ben
Ben@BennysCode·
@Python_Dv 21 - When it hits 18 it will run once one making it 21 and will not run again because it is NOT less then 20.
English
0
0
0
5
Iyuiah Tokigawa
Iyuiah Tokigawa@HypnoticHaccker·
@Python_Dv A 3 add to a less than 20 directory while the answer of x truly equals x+3 then no way it is a constant like 18... It will be a implement number of a cutoff route... Like 19
English
0
0
0
9
Iyuiah Tokigawa
Iyuiah Tokigawa@HypnoticHaccker·
@Python_Dv It's really only 18 or 19. Considering x=x+3 I would have to say 19
English
0
0
0
7
Guru Markan
Guru Markan@Guru_Markan·
@Python_Dv So it be 21 as the while loop does post processing so when the x is 18 it will run the loop first because of post processing so the answer would be 20 *this is unrelated it will be 21 because the loop will run until x< 20 and 18<20 so condition is true*
English
0
0
0
34
Fikri
Fikri@ammadali_fikri·
@Python_Dv 4. 21 while x still less than 20, it will be add by 3 until the x exceeds 20, by the time it exceeds, the code will be print x which is 21.
English
0
0
0
5
Hirayuka
Hirayuka@Hirayuka1990·
@Python_Dv Answer: 21 When x becomes 21, the condition `while x < 20` is no longer satisfied, so the loop terminates. `print(x)` then outputs 21.
English
0
0
0
193
Xiif Xaliss
Xiif Xaliss@xiif_xaliss·
@Python_Dv 1. **Initialisation** : `x = 0` 2. - La condition de la boucle est `while x < 20`. - À chaque itération, `x` augmente de 3 : `x = x + 3`. 1ère itération: `x = 0 + 3 = 3` 2ème itération : `x = 3 + 3 = 6 Ainsi de suite jusqu'à 21
Français
0
0
0
18
Paylaş