Operators
What is the output?
print (3/2)
1.5
Which data type stores letters, numbers, and symbols.
What is a string?
This operator "glues" two strings together.
What is the concatenation (+) operator?
Fix the error:
print ("3" + 2)
Which data type stores decimal numbers.
What is a float?
print (x[4:])
on
What is the output?
print (12 % 5)
2
x = True
print (type(x))
<class 'bool'>
What are values of n?
for n in range(1,5):
1, 2, 3, 4
x = "python"
print (x[:3])
pyt
What is the output?
print (1 % 3)
1
What are the values of n?
for n in range (3, 1, -1)
3, 2
x = "python"
print (x[6])
exception (Index Error)
What is the output?
print (3 + 5 ** 2 - 20)
8
What are the values of n?
for n in range (1, 5, 2):
1, 3
x = "python"
print(x[6:7])
blank line