Deadline: Tu 3/3/2015 at 7 AM
Refer to the Week 7 reading or other resources as necessary to complete this assignment.
Answer Question 1 (the vocabulary question) in your pre-lab.
Then, go to the online Python 3 tutor to complete the remaining practice questions. You should try to predict the answers before putting them into the online tutor.
These questions cover string indexing, concatenation, repetition, slicing, and justification.
x = 'I am a string' y = 'me too' print(x[2])Predict what this code will do and answer Question 2 in your pre-lab.
x = 'I am a string' y = 'me too' print(x[2] + y[1])Predict what this code will do and answer Question 3 in your pre-lab.
x = 'I am a string' y = 'me too' print(x + y)Predict what this code will do and answer Question 4 in your pre-lab.
x = 'I am a string' y = 'me too' print(x + y) print(x)Predict what this code will do and answer Question 5 in your pre-lab.
x = 'I am a string' y = 'me too' print(2 * y)Predict what this code will do and answer Question 6 in your pre-lab.
x = 'I am a string' y = 'me too' print(y[1:5])Predict what this code will do and answer Question 7 in your pre-lab.
x = 'I am a string' y = 'me too' print(y[:5])Predict what this code will do and answer Question 8 in your pre-lab.
x = 'I am a string' y = 'me too' print(y[1:])Predict what this code will do and answer Question 9 in your pre-lab.
x = 'I am a string' y = 'me too' print(y[:])Predict what this code will do and answer Question 10 in your pre-lab.
x = 'I am a string' print(x.upper())Predict what this code will do and answer Question 11 in your pre-lab.
x = 'I am a string' print(x.lower()) print(x)Predict what this code will do and answer Questions 12 and 13 in your pre-lab.
x = 'I am a string' z = x.split() print(z[0]) print(x)Predict what this code will do and answer Questions 14 and 15 in your pre-lab.
x = 'I am a string' for w in x.split(): print(w, end="") print()Predict what this code will do and answer Question 16 in your pre-lab.
x = 'I am a string' y = x.split() print(len(y))Predict what this code will do and answer Question 17 in your pre-lab.
Review your answers, and then click the Next button at the bottom of the Moodle quiz.
Once you do that, you should see something similar to this:
Click the Submit all and finish button. You MUST do this so that your
pre-lab can be graded! Once you have submitted your quiz, you should see
something similar to this at the top of your Moodle window. The important part is that the State shows up as Finished.