NEW
Font size
WorksheetsFor loop
Total questions: 10
Worksheet time: 3mins
what will this display?/ Экранға қандай жауап шығады?
0,1,2,3,4,5
0,1,2,3,4
1,2,3,4,5
Error
For i in range(5):
print('Happy Python') Мына код орындалғанда 'Happy Python' сөзі неше рет экранға шығады?
4
5
6
What are the syntax errors in this code?/ Қандай синтаксистік қате бар?
:
Not indented
Both options
What is the variable in this for loop. /Мына for циклының есептегішін/айнымалысы/ көрсетіңіз.
x
(6)
for
range
This loop can only be used when the programmer knows the number of times a code is to be repeated/ Бұл циклды программист оның қанша рет қайталанатынын білген кезде қолданады.
while
for
do while
repeat until
What is a loop? Цикл дегеніміз не?
A condition
A set of intructions that are repeated until a certain condition is met
A set of rules
To repeat a fixed number of times use a / Алдын ала белгілі қайталану санын қолданатын цикл
while loop
for loop
if loop
indentation
What would be the starting value in the FOR LOOP code?/FOR циклі кодында бастапқы мән қандай болады?
100
10
5
20
s=0
for i in range(1,5,2):
s=s+i
print(s)
What would be the ending value in the FOR LOOP code?/ FOR циклі орындалған соң шығатын мән қандай болады?
15
1
10
100
In a Python program, how many iterations(loops) will occur for the FOR LOOP code? / Python бағдарламасында FOR цикл коды үшін қанша итерация (цикл) болады?
1
10
9
8
