Question: Solve all: Input Filetracing - NotepadFile Edit Format View Helphello, world, hello, universe hello, world, hello, universe Question 1 : What is the value stored
Solve all: Input Filetracing NotepadFile Edit Format View Helphello, world, hello, universe hello, world, hello, universe
Question : What is the value stored in 'sentence' after the function is run with
fname 'tracing.txtthe input file
Question : Suppose you replace Line of the function with:
if word 'hello'
a Does the function output the same result as before? Express your answer as 'yes' or no
b Will the function error at any point? If not, your answer should be otherwise it should be the wordCount for which it might error.
Question : Suppose you duplicate Line at the end of your code. What would be the value stored in 'sentence' after the function is run with fname 'tracing.txt
Question : Suppose your input file contains the following text instead:
hello,world,Hello,universe hello,Galaxy,hELlo,planet
Which of the following replacements for Line would lead to the same result as the original function? SELECT ALL THAT APPLY
A: if lowerword 'hello';
B: if lengthword alllowerword 'hello';
C: if upperword 'HELLO' lengthword;
D: if strcmpiword 'hello';
You answer should be a string with all of the correct options in alphabetical order separated by a single comma. For example, if you think all of them are correct, your answer should be ABCD
If you didn't know, the way an if statement works with && is if the first part of the statement is false, it doesn't even look at the second part! So if I have:
if length vecvec
when lengthvec produces a false, Matlab won't even evaluate vec This is important because if the length of the vector isn't at least then you wouldn't be able to index the th position and it would error!
Keep this necessary ordering in mind when answering the question.
Question : Which of the following changes to the code could cause an infinite loop to arise?
SELECT ALL THAT APPLY
A: removing Line
B: replacing Line with: word rest strtokstring
C: removing Line
D: All of the Above
You answer should be a string with all of the correct options in alphabetical order separated by a single comma. For example, if you think the first are correct, your answer should be A BC
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
