Answer:
Option A: FileNotFoundError
Explanation:
FileNotFoundError is an exception which is thrown when a program fail to open a specified file. The root causes of this type of error can be:
- The directory path to locate a target file is wrongly defined in our code due to a typo on the file name or misuse of relative directory path, such as ../ and ./ which denote two different paths.
- For some reasons, a target file is misplaced in a wrong directory.
Any one of the above reasons can lead to the exception to be thrown when the file doesn't exist.
def replace_at_index(txt,ind):
new_txt = ""
for x in range(len(txt)):
if x == ind:
new_txt += "-"
else:
new_txt += txt[x]
return new_txt
s = replace_at_index("eggplant", 3)
print(s)
I wrote my code in python 3.8. I hope this helps.
Answer:
Identifying Responses and Replies by using the drop-down menus to complete the sentences about message response is written below in detail.
Explanation:
A situation like this may be:
Someone receives a bike. They travel it and all, and then all of an unexpected they fall and get injured
If you only understood the first section of how the person received a bike when you draft a response, you would only draft about that piece, but getting harm after receiving the bike is also a huge portion of the "story". You could draft like how you were so pleased when you received your first bike, but you wouldn't remember to address the time you got injured when you were riding down a hill or something.