WorksheetsPython - test yourself
Total questions: 5
Worksheet time: 4mins
Name
Class
Date
1.
How do you find out the data type of a variable?
a)
data()
b)
type()
c)
datatype()
d)
typecast()
2.
Python is a (a) programming language
3.
What values does boolean data type have in python?
(Multiple options available)
a)
Right
b)
True
c)
Correct
d)
False
4.
X=20
How do I convert X into a string?
a)
X= function (X)
b)
X= typecast(X)
c)
X=str(X)
d)
X=convert(X)
5.
What is the output of this program if user enters 54 for value of a?
a=input("Enter a number :")
if a.isnumeric() :
print("Yes variable a is numeric")
else:
print("No variable a is not numeric")
a)
Yes variable a is numeric
b)
No variable a is not numeric
c)
Syntax error
d)
Are you crazy?
100 %
