What are three basic data types?
integer,float and string
What are the two logical operators in python
and,or
What's the output of this:-
a=20%3
print(a)
2
check if correct or incorrect?
a="The world is a beautiful place"
correct
What's the output:-
a=10
b=100
print("a=b")
a=b
Check if its correct or incorrect:-
NUM=200
print(num)
incorrect
What's the output of these statements
a=100
b=200
print(a<b and a==b)
False
What's the output of this:-
a=240
b=12
c=float(a/b)
print(c)
20.0
Does isupper() return a boolean value?
True
What's the output of this: -
a="Sunshine"
b=12
print(a+b)
Error
What's the output for these statements:-
a=10
b=20
print("Value of a is ",a+b)
Value of a is 30
What's the output of this:-
a=100
b=200
print(a<b or a==b)
True
What's the operator of integer division
//
What's the output of this:-
name="sunshine"
print(name.title())
Sunshine
What's the output?
a=13.4
b=17.5
print(a+int(b))
30.4
What's the data type of the name variable
name=100
integer
Do logical operators return Boolean value?
yes
What's the output of this?
print(17/2)
print(17%2)
print(17//2)
8.5,1,8
What's the output of this statement?
name="WVA"
print(name.lower())
wva
What's the output?
a=10.78
b=100.65
print(int(a+b))
111
What's the data type of num variable
num="100"
String
Check if the output of the statement is correct or incorrect?
and operator returns true only if both the conditions are true
correct
What's the output of this expression
16+20-18*(2+8)*6%2
36
Name six string functions
upper,lower,title,isupper,islower,istitle
What's the output of this:-
a=100.2
b=13.2
c=14.78
print(a+b+int(c))
127.4