NEW
Font size
WorksheetsPython - Data types and Conditional statements
Total questions: 10
Worksheet time: 5mins
which function is used to find the ASCII value of a character ?
range ()
ord()
chr()
add()
True and False is a which type of data types ?
string
char
bool
float
Python was released in which year ?
1991
1992
1994
1995
What will be the output of the given code :
a = int(6.58)
if(a>6):
print("Hi")
else:
print("Bye")
Hi
Bye
Error
Both Hi and Bye
What will be the output of the given code:
A = 10
B = 20
PRINT(A+B)
1020
30
A+B
error
What will be the output of the given code:
A = 10
B = 20.45
print(int(A+B))
30.45
error
30
1020.45
What will be the output of the given code:
print("Hello\nWelcometo\nPython")
HelloWelcometoPython
Hello Welcome to Python
Hello
Welcometo
Python
error
while is a :
conditional statement
function
loop
escape sequences
What will be the output of the given code ?
A = 20
B = 15
C = 10
if(B > C and A > B):
print("Good Work!")
else :
print("Try Again!")
Good Work!
Try Again!
Error
Will not print anything
What will be the output of the given code:
A = 20
B = 15
C = 20
if(A==C):
print("A and C Both are equal")
else :
print("Not Equal")
Error
Not Equal!
A and C Both are equal
Will not print anything
