How can the anwer be 8 | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can the anwer be 8

aslong as I know the script in this question is value 0 till 6 cuz it begins at 0 but the correct answer is 8?¿

27th Dec 2016, 11:49 AM
Huseyin Sahin
Huseyin Sahin - avatar
5 Answers
+ 6
$x = 0; while (x <= 7){code} as long as x is less or equal to 7 it won't quit the loop so it'll stop at 8.
27th Dec 2016, 11:55 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 5
What question?
27th Dec 2016, 11:50 AM
Valen.H. ~
Valen.H. ~ - avatar
+ 1
module 5 quiz second question controllsturctures
27th Dec 2016, 11:53 AM
Huseyin Sahin
Huseyin Sahin - avatar
+ 1
ahhh so thats why it is <= and not ==
27th Dec 2016, 11:57 AM
Huseyin Sahin
Huseyin Sahin - avatar
0
module 5 quiz second question controllsturctures
27th Dec 2016, 11:53 AM
Huseyin Sahin
Huseyin Sahin - avatar