Question: using python 3. i just need question 4 CSIS 153 Lab 1- iteration Fall 2017 1. describe 4 errors, then rewrite code : | #describe
using python 3. i just need question 4
CSIS 153 Lab 1- iteration Fall 2017 1. describe 4 errors, then rewrite code : | #describe the 4 errors def calcAvg (scorelist): for sc in scorelist tot += sc ct += 1 returntot/ct) print calcAvgl[10,20,30 ]) print calcAvgl[) #corrected code: 2. up'# of words with > 5 chars u Trace the code, assuming the user entered "Hello I'm feeling fine !" sent = input("Enter a sentence "); ct=0 | wordList word len(word) | ct | output wordList = sent.split " ") for word in wordList: if lenword) >= 5: ct += 1 print(ct) 3. Trace the code: numfound = 0; tot = 0 for ct in range6, , : (253) tot +: = ct if (ct %2 == O) or (ct % 5 == 0): numFound +=1 print(ct, tot) print(num Found) numfound tot | at 1 Output 4. Trace the code: adr = "340 W 1st' " digStr =" "; ct = 0 while ct
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
