Change Contents of the Bubble
Welcome to CS1315. Click on the python to add comments.

Looking for the book? They have it at the Engineer's Bookstore at 748 Marietta St NW. Here is there website: http://www.engrbookstore.com/ - Monica

Hotspots: Slides and CodeTA CornerComments?AnnouncementsFAQStatic Webspace
View this PageEdit this PageUploads to this PageHistory of this PageHomeRecent ChangesSearchHelp Guide

Fall 2006 Midterm 2 Review: String Fun

change1(): returns
georgi institute of technology
gorgi institute of technology
gorg institute of technology
grg institute of technology

grg institte of technology

change2(): returns

grg nsttt f tchnlgy

Stacy Schwaiger

Correct - Bobby Mathew

change1() is almost right, but when I ran it, the last string had no "u" in "institute" any longer.

i agree, there should be 5 strings with the last one omitting the u in institute

The answer in bold is the final answer and its right. - Bobby Mathew

Dear TA(s),
I'm sorry for bothering you..!! When I run change1(), it seems to automatically return 'grg institte of technology'–hypothetically speaking, if that is my answer to this question, would it be correct? –or should I have put the 5 lines of code preceding from the loop..? Thank you so much!!!
No, you're right. It will only return that last line. The answer given above just shows the steps in getting upto that final answer. - Bobby Mathew

will we need to know how to write this code or just understand the concepts?
No, if we require you to code something, it will be really specific. But you should be able to know how to use the different string functions in your code. - Bobby Mathew

Thank you very much for answering "Dear TA(s)"!!! That makes much sense now, yayyy :D

what does [:loc mean, i guess what does it mean when you type, the [: xxx] and the [ xxx + 1:]

[:loc] tells the function to access everything in the string to the loc-1 and [loc+1:] tells the function to start at the loc+1 index and access everything from there back, hope this helps Brittany Duncan



Link to this Page