Answers25
x = 'Texas A&M University'
x [-3] = ? - ANSWERS-i
x = 'Texas A&M University'
x [3] = ? - ANSWERS-a
x = 'Texas A&M University'
len(x) = ? - ANSWERS-20
x = 'Texas A&M University'
x [0:5:2] = ? - ANSWERS-Txs
It starts at 0 and ends at 5, incremented by 2
x = 'Texas A&M University'
x [4:] = ? - ANSWERS-s A&M University
x = 'Texas A&M University'
x [:4] = ? - ANSWERS-Texa
x = 'Texas A&M University'
'A' in x = ? - ANSWERS-True
Acts as a Boolean, determines if it is in the string
,x = 'Texas A&M University'
't' in x = ? - ANSWERS-True
x = 'Texas A&M University'
'A&M' in x = ? - ANSWERS-True
x = 'Texas A&M University'
' ' in x = ? - ANSWERS-True
x = 'Texas A&M University'
' ' in x = ? - ANSWERS-False
2**1+1 - ANSWERS-3
3* 1**3 - ANSWERS-3
2*(3+1) - ANSWERS-4
What is the output of: 11.0//2 - ANSWERS-5.0
Floor division to the nearest whole number
Returns a float
What is the output of: 11//2 - ANSWERS-5
Return an int
What is the output of: 11/2 - ANSWERS-5.5
, Returns a float
What is the output of: 11/2.0 - ANSWERS-5.0
What is the output of: 20%2 - ANSWERS-0
What is the output of: 21%2 - ANSWERS-1
What is the output of: 11%3 - ANSWERS-2
6+4/2 - ANSWERS-8.0
Returns a float due to the division
len('Hello world') = ? - ANSWERS-11
Be sure to count the spaces as values
int(-2.3) = ? - ANSWERS--2
float(32) = ? - ANSWERS-32.0
str(3.14159) = ? - ANSWERS-3.14159
[0] * 4 = ? - ANSWERS-[0, 0, 0, 0]
[1, 2, 3] * 3 = ? - ANSWERS-[ 1, 2, 3, 1, 2, 3, 1, 2, 3]