I have a question about the MyTeacher YourTeacher thing.
“>>> MyTeacher = "Mrs. Goodyear"
>>> YourTeacher = MyTeacher
>>> MyTeacher
"Mrs. Goodyear"
>>> YourTeacher
"Mrs. Goodyear”
The question in the cartoon says "If we replaced Mrs. Goodyear with Mrs. Tysick, would YourTeacher change to Mrs. Tysick?"
The book says No, and I do not understand why? Won't it just assign YourTeacher whatever the value of MyTeacher is in the program? I wrote the program and changed the name and every name you change it to is the name YourTeacher is given.
“>>> MyTeacher = "Mrs. Tysick"
>>> YourTeacher = MyTeacher
>>> MyTeacher
"Mrs. Tysick"
>>> YourTeacher
"Mrs. Tysick”
Why does the book say No to that question? I don't understand the whole sticking a label on something else when the word replace was used in the text.
Thanks for any assistance.
|