PART A: Answer the following about Python Strings: 1. What is the type of \"Hell
ID: 3565865 • Letter: P
Question
PART A:
Answer the following about Python Strings:
1. What is the type of "Hello! This is CSC110 Class"
2. Write a Python statement to print: Here is a double quote" and this is a single quote '
3. The first character in a string is at what index?
4. The last character in a string is at what index?
5. Write a Python statement that prints the fourth character in string "Python"
PART B:
What is the output from the following Python statements, given:
fruit = 'Passionfruit'
1. len (fruit)
2. fruit[2:5]
3. fruit[0:]
4. fruit[:9]
5. fruit[:]
Explanation / Answer
1. string
2.print "Here is a double quote" and this is a single quote '"
3. 0
4. length-1
5. var1 = 'Python'
print var1[3]
Part B
12
fruit[2:5] ==> ssi
fruit[0:] ==> Passionfruit
fruit[:9] ==>passionfru
fruit[:] ==> Passionfruit
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.