while σε for, υπό προϋποθέσεις...

You got 5 of 8 possible points.
Your score: 63%
Question 1

Μπορεί να μετατραπεί η ακόλουθη while σε for;

i=10

while i>2:

    print i

    i=i-3

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

for i in range(10, 2, -3):

    print i

1
Should have chosen

for i in range(10, 0, -3):

    print i

0

for i in range(2, 10, -3):

    print i

0
Question 2

Μπορεί να μετατραπεί η ακόλουθη while σε for;

i=100

while i>10:

    print i

    i=i-10

Score: 1 of 1
Your answerChoiceScoreCorrect answer

for i in range(100, 20, -10):

    print i

0
Selected

for i in range(100, 15, -10):

    print i

1
Should have chosen

for i in range(100, 0, -10):

    print i

0
Question 3

Μπορεί να μετατραπεί η ακόλουθη while σε for;

i=0

while i<50:

    print i

    i=i+1

Score: 1 of 1
Your answerChoiceScoreCorrect answer
Selected

for i in range(50):

    print i

1
Should have chosen

η while σε for; Are you sure?

0

for i in range(1,51):

    print i

0
Question 4

Μπορεί να μετατραπεί η ακόλουθη while σε for;

i=3

while i < 20:

    print i

    i=i+4

Score: 1 of 1
Your answerChoiceScoreCorrect answer

for i in range(4, 20, 3):

    print i

0
Selected

for i in range(3, 20, 4):

    print i

1
Should have chosen

for i in range(20, 4):

    print i

0
Question 5

Μπορεί να μετατραπεί η ακόλουθη while σε for;

i=10

while i < 25:

    print i

    i=i+5

Score: 0 of 1
Your answerChoiceScoreCorrect answer

for i in range(10, 26, 5):

    print i

0

for i in range(10, 21, 5):

    print i

0
Should have chosen
Selected

for i in range(15, 25, 5):

    print i

0
Question 6

Μπορεί να μετατραπεί η παρακάτω while σε ισοδύναμη for;

i=5

while i<10:

    i=i+1

    print i

 

Score: 0 of 1
Your answerChoiceScoreCorrect answer

for i in range(6,11):

    print i

0
Should have chosen
Selected

Με τίποτα!

0

for i in range(5,10):

    print i

0
Question 7

Μπορεί να μετατραπεί η παρακάτω while σε ισοδύναμη for;

i=4

while i>0:

    i=i-1

    print i

 

Score: 0 of 1
Your answerChoiceScoreCorrect answer

for i in range(3,-1,-1):

    print i

0
Should have chosen

Με τίποτα!

0
Selected

for i in range(4,0,-1):

    print i

0
Question 8

Μπορεί να μετατραπεί η παρακάτω while σε ισοδύναμη for;

i=4

while i>15:

    print i

     i=i-1

 

Score: 1 of 1
Your answerChoiceScoreCorrect answer

for i in range(4,15):

    print i

0
Selected

χμμ... μάταιος κόπος, i=4

 

1
Should have chosen

for i in range(15,4,-1):

    print i

0