Question: Topic: strings and text files 11) What happens if you try to open a file for reading and you misspell the filename? 12) What happens

Topic: strings and text files  Topic: strings and text files 11) What happens if you try

11) What happens if you try to open a file for reading and you misspell the filename? 12) What happens if you try to open a file for writing and you misspell the filename? 13) Wh at happens if you want to open a file for reading, but you use 'w' when you call the open function? 14) Why should you always close files when you are finished using them, especially files that you are writing to? 15) 'sentence' is a string variable that contains the following text: Can you here me now? Write a segment of code that will correct the word error, so that sentence contains: Can you hear me now? 16) Using the variable named 'sentence' in question 15), write a segment of code that will count how many words are in the string. You can assume that there is one space character between each word. 17) How many times is the word "Hello" printed by the code below? for vall in range (3): for val2 in range (4): print("Hello")

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!