Font size
WorksheetsПрограммалау рубежка 1
Total questions: 78
Worksheet time: 1hrs 18mins
a=5; b=8; a==b
false
true
a=b
a==b
not
x=5; y=8; x!=y
true
false
x=b
x!=y
not
x1=15; x215; x1==x2
true
false
x1=x2
x1==x2
not
y1=15; y2=15; y1!=y2
false
true
y1=y2
y1!=y2b
not
z1=5; z2=8; z1==0
false
true
z1!=0
z1!=z2
not
a1=5; a2=8; a1>a2
false
true
a1!=a2
a1=a2
b1=-5; b2=-8; b1>b2
true
false
b1!=b2
b1=b2
c1=-5; c2=-8; c1>0
false
true
c1!=0
c1!=0
for i in range(5): print(i)
0 1 2 3 4
0 1 2 3 4 5
1 2 3 4 5
0 5
for i in range(1,5): print(i)
1 2 3 4
0 1 2 3 4
1 2 3 4 5
0 5
for j in range(0,5,2): print(j)
0 2 4
0 1 2 3 4
1 3 5
1 2 4
for n in range(1,5,2): print(n)
1 3
0 1 2 3 4
1 3 5
2 4
for k in range(2,5): print(k)
2 3 4
0 1 2 3 4
2 3 4 5
2 5
for m in range(3,5): print(m)
3 4
1 2 3 4
2 3 4
2 5
a=5; b=8;______ if a>0: print(a+1) _____else: print(b+2)
6
10
a+1
b+2
x=5; y=8;______ if x>0: print(‘x+1’) _____else: print(‘y+2’)
x+1
6
10
y+2
z1=5; z2=8;______ if z1<0: print(‘z1+1’) _____else: print(‘z2+2’)
z2+2
z1+1
6
10
a=5; b=8;______ if a<0: print(a+1) _____else: print(b+2)
10
b+2
a+1
6
y1=5; y2=8;______ if y2>0: print(y1+1) _____else: print(y2+2)
6
10
y1+1
y2+2
c1=5; c2=8;______ if c2>0: print(‘a+1’) _____else: print(‘b+2’)
a+1
6
10
b+2
m1=5; m2=8;______ if m2<0: print(‘m1+1’) _____else: print(‘m2+2’)
m2+2
m1+1
6
10
q=5; t=8;______ if t<0: print(q+1) _____else: print(t+2)
10
t+2
q+1
6
a1=5; a1+=6; print(a1)
11
5
a1
6
a1=5; a1+=6; print(a1)
-1
5
b1
6
a1=5; a1+=6; print(a1)
-1
5
b1
6
s=5; s*=6; print(s)
30
5
s
6
d=12; d/=6; print(d)
2.0
1/2
d
12
n=2; print(n**2)
4
2
n**2
true
r=2; print(r**3)
8
2
r**2
4
h=1; print(h**5)
1
2
h**5
5
p=1; print(p**2)
1
2
p**2
5
w=1; print(w**4)
1
2
w**4
4
x=6; x < 5 and x < 10
false
true
not
and
z=6; z < 5 and z < 10
false
true
not
and
x = 30; ______if not x == 50: print('the value of x different from 50')
______else: print('the value of x is equal to 50')
the value of x different from 50
'the value of x different from 50'
'the value of x is equal to 50'
the value of x is equal to 50
y = 40; ______if not y == 50: print('the value of x different from 50') ______else: print('the value of x is equal to 50')
the value of x different from 50
'the value of x different from 50'
'the value of x is equal to 50'
the value of x is equal to 50
f = 50; ______if not f == 50: print('the value of x different from 50')
______else: print('the value of x is equal to 50')
the value of x is equal to 50
'the value of x is equal to 50'
'the value of x is equal to 40'
the value of x is equal to 40
www = ["apple", "banana", "cherry"]
for u in www: ______if u == "banana": continue ______print(u)
apple cherry
”apple” “cherry”
banana
>”banana"
fruits = ["apple", "banana", "cherry"]
for v in fruits: ______if v == "apple": continue ______print(v)
banana cherry
apple cherry
banana apple
>”banana”
e = ["apple", "banana", "cherry"]
for q5 in e: ______if q5 == "cherry": continue ______print(q5)
apple banana
apple cherry
banana cherry
>”cherry”
s = ["apple", "banana", "cherry"]
for x1 in s: ______________ print(x1)
______________ if x1 == "banana":break
apple banana
apple cherry
banana cherry
>”cherry”
fff = ["apple", "banana", "cherry"]
for r in fff: ______________ print(r)
______________ if r == "apple":break
apple
apple cherry
banana
cherry
bbb = ["apple", "banana", "cherry"]
for m in bbb: ______________ print(m)
______________ if m == "cherry":break
apple banana cherry
apple banana
apple cherry
banana cherry
print(type(452))
class 'int'
class 'float'
class 'real'
class 'str’
print(type(452.57))
class 'float'
class 'int'
class 'real'
class 'str'
print(type('YES'))
class 'str'
class 'float'
class 'int'
class 'real'
print(type(5+5j))
class 'complex'
class 'float'
class 'int'
class 'real'
x45 = 0; ________ while (x45 < 5): print(x45); x45 += 1
0 1 2 3 4
0 1 2 3 4 5
1 2 3 4 5
0 1 2 3
yy = 1; ________ while (yy < 5): print(yy); yy *= 2
1 2 4
0 1 2 3 4 5
1 2 3 4
0 1 2 3
xx = 1; ________ while (xx < 5): print(xx); xx *= 3
1 3
1 2
1 2 3 4
1 2 3
aaa=5; bbb=8;______ if aaa<0: print(‘aaa+1’) _____else: print(‘bbb+2’)
bbb+2
aaa+1
10
true
ba=5;b bb=8;______ if ba<0: print(ba+1) _____else: print(bb+2)
10
bb+2
ba+1
6
Жұп санды тексеретін шарт
if a%2==0
if a%2!=0
if a%3==0
if a%3!=0
Тақ санды тексеретін шарт
if a%2!=0
if a%2==0
if a%3==0
if a%3!=0
3-ке бөлінетін сандарды тексеретін шарт
if a%3==0
if a%2!=0
if a%2==0
if a%3!=0
5-ке бөлінбейтін сандарды тексеретін шарт
if a%5!=0
if a%3!=0
if a%2!=0
if a%2==0
math.pow(5,3) ұқсас орындалатын оператор
5**3
3**5
5*3
3*5
8**9 әрекетіне ұқсас орындалатын оператор
math.pow(8,9)
math.pow(9,8)
math.pow(9,9)
math.pow(8**9)
print(math.pow(4,3)) ке ұқсас амал орындалатын оператор
print(4**3)
print(3**4)
print(4*3)
print(math(4,3))
print(5**6) -ке ұқсас орындалатын оператор
print(math.pow(5,6))
print(math.pow(6,5))
print(math.pow(5,5))
print(math.pow(5**6))
print(5%2)
1
0
2
3
print(8%2)
0
1
2
3
print(6%8)
6
1
2
0
print(6//4)
1
3
2
0
print(8//4)
1
3
2
0
8%2 әрекетіне ұқсас орындалатын оператор
math.fmod(8,2)
math.pow(8,2)
math.mod(8,2)
math.fmod(8,3)
print(math.fmod(9,2))
1.0
3.0
2.0
0
Қалдық есептейтін математикалық функция
math.fmod(x,y)
math.pow(x,y)
math.ceil(x)
math.mod(x,y)
print(math.factorial(4))
24
120
6
30
i=0; while i<=10: ____ i=i+1 ____ if i==7: break ____ print(i)
1 2 3 4 5 6
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7
0 1 2 3 4 5 6 7 8 9
a=(3,-5,1,2, 4, 1); s=0 ____for i in a: if i%2==0: s=s+1 ____print(s)
2
1
3
4
b=(3,-5,1,2, 4, 1); s=0 _____ for i in b: if i%2!=0: s=s+1 _____print(s)
4
2
3
1
z=(0,3,-5,1,2, 0, 1); s=0 _____for j in z: if j==0: s=s+1 ____print(s)
2
4
3
1
y=(7,-3,0,1,2, 0, 1); n=0 _____for j in y: if j!=0: n=n+1 _____print(s)
5
4
3
1
x=(1,-3,0,1,2,0,1); s=0 ____for j in x: s=s+j _____print(s)
2
5
4
3
d=(2,-3,0,-1,2,0,1); s=0 _____for j in x: if j<0: s=s+j ____print(s)
-4
-3
4
3
xy=(-2,-3,0,-1,2,0,1); s=0 _____for j in xy: if j>0: s=s+j ______print(s)
3
2
5
4
Автор
красавчик
молодец
