IT 116: Introduction to Scripting
Class 26 Ungraded Quiz
-
Are strings sequences?
-
What are the elements of a string?
-
Write a Python expression that returns the FIRST character in
the string team.
-
Write a Python expression that returns the LAST character in
the string team.
-
Can you use a negative number as an index to a string?
-
If the string variable team is
assigned the value "Red Sox", what does the following expression
return?
team[-1]
-
Can a string be changed?
-
Write a Python expression that returns a string consisting
of the FIRST 3 characters in the string team.
-
Write a Python expression that returns a string consisting
of the LAST 3 characters in the string team.
-
Write a loop to print the individual characters of a the string
team with each character appearing
on a separate line.