WorksheetsPython
Total questions: 29
Worksheet time: 15hrs 30mins
It displays an output
Какую логическую операцию нужно добавить в программу вместо многоточия, чтобы значение переменной «a» после выполнения фрагмента программы стало равно 3?
a = 10
b = 5
if a > 1 ... a < b:
a = a - 7
else:
a = a + 7
(a)
.
Определите значение переменной a после выполнения алгоритма:
a = 4
b = 6
b = 8 + a* b
a = b / 4 *a
В ответе укажите одно целое число – значение переменной a.
(a)
Чему будет равна переменная «c» после выполнения этой программы:
a = 28
b = 7
c = a % b + b
(a)
Чему будет равна переменная «c» после выполнения этой программы:
a = 22
b = 4
c = a // b + a
(a)
Чему будет равна переменная «c» после выполнения этой программы:
a = 20
b = 3
b = a // b
c = a % (b + 1)
(a)
Выберите правильную запись присвоения переменной A значения, введенного с клавиатуры..
А=input()
A:=input()
A=int(input())
A=print()
print("Hello world!\nHello world!")
Hello world!
print("Hello" + str(2) + "world!")
print(Hello world!)
print("Hello world!" * 2)
people = ["John", "Rob", "Bob"]
print (people[1])
what would this result be?
people = ["John", "Rob", "Bob"]
print (people[-1])
what would this result be?
people = ["John", "Rob", "Bob"]
print (people[4])
what would this result be?
What Is The Output Of The Following Code Snippet?
def func(message, num = 1):
print(message * num)
func('Welcome')
func('Viewers', 3)
Welcome
Viewers
Welcome
ViewersViewersViewers
Welcome
Viewers,Viewers,Viewers
Welcome
What is the index of the name 'Paula' in the following list:
names = ["Paul","Phillip","Paula","Phillipa"]
0
1
2
3
The result of this program:
Friday = False
if Friday:
print "Jeans day!"
else:
print "Uniform day"
Jeans day
Today is Friday
Uniform day
Not Friday
What is the output?
True
False
condition1
condition2
Extension of Python
py
.py
.PYS
.PYE
What is the output of the following code?
var1 = 1
var2 = 2
var3 = "3"
print(var + var2 + var3)
6
33
133
Error. Mixing operators between numbers and strings are not supported
19 % 2 in python
1
2
9
None of these
Which of the following operators is the correct option for power(ab)?
a ^ b
a**b
a^^b
a ^ * b
