Question
Answer the following questions about advanced Python data types: evaluate each expression and enter into the blank the appropriate value that would be assigned to
Answer the following questions about advanced Python data types: evaluate each expression and enter into the blank the appropriate value that would be assigned to X. For each question, assume that the following variables have all been defined: S = "frogs and toads", L = [3, 7.8, "dog", (9, 2, 5), 5.2, 99], and T = (2, [7, 6], "cat", 4.1, 13). If your answers are strings, make sure to enter them with proper quotes.
1. X=len(S)
2. X=len(L)
3. X=len(T)
4.X=S[1]
5. X=S[-1]
6. X=S[len(S)-3]
7. X=L[1]
8. X=L[2][1]
9. X=L[len(T)]
10. X=L[0]+T[0]
11. X=L[2]+T[2]
12. X=len(L[3])
13. X=T[1][0]
14. X=T[2][0]
15. X=L[3][0]+T[1][1]
Please show how you put it into Python. Pictures preffered, but not necessary.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started