No student devices needed. Know more
15 questions
Which one of the following is correct way of declaring and initializing a variable, x with value 5?
int x
x=5
int x=5
x=5
declare x=5
Which of the following is not valid variable name in Python?
_var
var_name
var11
11var
Which of the following statement is False?
Variable names can be arbitrarily long.
They can contain both letters and numbers.
Variable name can begin with underscore.
Variable name can begin with number.
What is the output of the following code: print 10//3
3.5
3
1
Error
Which of the operator means less than equal to ?
>
<
>=
<=
what is the correct output
PYn PYnat ive PYnativ
Yna PYnat tiv PYnativ
Yna PYnat tive PYnativ
Yna PYnat tive PYnative
8. If, else and elif is used for…..
Selection
Indentation
printing
iteration
what is the variable name in this code?
if
secret
password
else: is used
to give an extra condition
to provide an output when the other conditions are false
because it is required
if we do not use it, it gives error
What symbol do you use to make or add a comment in Python?
@
¬
;
#
Sonam has written this program in Python. One of the lines contains at least one error. Which line is it?
print(“Hello world!”)
name=input(‘please enter your name’)
print(happy to meet you)
print(‘you have great name’)
What is the output of the program
4
2
5
0
Which lines are having an error in the shown code
Line 1 and 2
Line 2 and 3
Line 3 and 4
line 5 and 6
what is the correct output
Welcome wangchuk
WelcomWangchuk
Welcom Wangchuk
WelcomeWangchuk
write the output of the program
Thinley is in class 9A
Thinley is in 9A
Thinleyisin9A
error
Explore all questions with a free account