Question: A) I cannot find a way to draw this codes procedure into flowchart. B) when I run the code, insert file name comes up as
OUT = 0 wordf lag OUTnch nwordnline 0 ") inf ilenameinput (" Insert file name inf i leopen( inf i lename, "r") fillecontents inf ile.read) for c in filecontents nch += 1 if (c= 'Wn . ) : nline f ((c I- ') and (c1= Wn.) and (c != "We') and (wordflag = OUT) ): wordf lag IN nworld1 ((c? HORDFLAGout if ') or (c-.-- .wn') or (c = "We') and (wordflag == IN)); print ("Input has %d characters, %d words, and %d lines" % (nch, nword, nline))
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
